Context: I'm setting up a home (linux) server to which I want to connect from work. I have a good ethernet connection but I live in a building that (presumably) shares the same IP as I do. I know my local IP.
Goal: I want to ssh into my machine from work.
Problem: When I try to connect to my computer ( ssh user@IP ), I'm prompted for a password, which I type in correctly, and then it tells me that my password is incorrect. I cannot log in.
1) Port 22 is open
- Code: Select all
[ME@localhost ~]$ nmap -oG -p22 MY.IP | grep ssh
22/tcp open ssh
At first I thought there was something wrong with my openssh server settings so I checked in /etc/ssh/sshd_config and everything in there looks normal.
I then decided to attempt to connect to the computer using a newly generated public/private key and disable the user's password (in principle this is more secure anyway provided that no one steals my private key somehow). I restarted my ssh server and found the following peculiarity:
When I log in through localhost (ssh user@localhost), then everything works as I set it up and I can log in. If I try and log in through my IP (ssh user@MY.IP), then it goes back to asking me for the user's password, and again denying me entrance. At this point I think I realize the problem... there is more than one ssh server on my network (and I have no control over them) and when I try to connect to my computer, it finds some other host instead? I'm not sure if this is the issue.
At this point I would LOVE to know, is there any way to specify that I want to connect to my computer's ssh server and not someone else's on my IP?
Or is there some other problem that I cannot see?
Thanks a lot for your help!