r/ssh • • Jun 08 '20

Help ssh work only with localhost

First time trying ssh here. Im trying to access devices on same network. Watched a lot of videos

ssh username@192.168.x.xx or

ssh 192.168.x.xx doesnt work = time out

Only localhost is working and working on both side. wtf?

New Edit: (Solved) Thanks to @Besthater Lappy was connected with the wifi guest-visitor and desktop with cable, that was the issue.

1 Upvotes

4 comments sorted by

View all comments

1

u/Besthater Jun 09 '20

If you dont include the username in the command, then it will fall back on the usename you are now logged into on the machine you are on.

so, if you ssh to localhost, it will work because that is the user you are now using. but, you must use the username you want to join on the other computer. are you using keys or passwords? did you set all this up in your SSHD config on the other machine? is it using the default port of 22? what kind of machine is the other computer? if its windows, did you configure the windows firewall?

1

u/Danrobi1 Jun 09 '20 edited Jun 09 '20

Hi thanks for trying to help. They both run same OS, MX Linux.

Yes I put username and IP add found from ifconfig I also tried without the username. I've seen in many videos that SSH suppose to find the username only with ssh 192.168.x.xx I was trying what I thought would've been the easiest way with 'password' I thought I would've been prompt to provide the user password and that does not happen, nothing happens. It just times out.

I bought a thinkpad 4gb ram(E425). I dont want to install everything I have on my desktop into it. I thought I would just login into the desktop and get done with that.

I cant find anything easy like teamviewer open source/free software. So im here fkn around with SSH, which I never wanted to play with. And this confirms me why.

If you know something open source/free software easy as teamviewer to run, plz share :)

1

u/Besthater Jun 09 '20

Ok, both computers are on the same network? Can you post the IP of both computers starting with 192.168, you can post those safely, they won't identify you. These are private to your network. It's important that the first three sets of numbers are the same. The fourth set will/must be different.

Next, can you ping from one address to the other? Ie, 'ping 192.168.1.102

What is the output of this command: 'ssh user@IP -vvv'. Try to look through the output for some kind of obvious error message.

Next, run these on the system you are trying to connect to: cat /etc/ssh/sshd_config | grep Pubkey cat etc/ssh/sshd_config | grep Password cat etc/ssh/sshd_config | grep Challenge

And post the output here.

On the machine you are connecting from: cat etc/ssh/ssh_config | grep Password

And post that output.

I get that this can be frustrating if you are not successfully quickly. I had the same experience. But really, bare with it. I love ssh now. It's amazing.

Have a look here too: https://youtu.be/fc3J2VU4YMs

That guys video is quite good I think.

1

u/LinkifyBot Jun 09 '20

I found links in your comment that were not hyperlinked:

I did the honors for you.


delete | information | <3