Remote SSH
I used to be able to use remote desktop and SSH to my home computer from work but once I changed my cable modem for the wireless router version I can't do that anymore. I lost all server abilites on my computer for anything. Games included. Is there anyway I can still do this or do I need to go back to the regular cable modem?
|
The router is probably performing NAT (network address translation) which blocks you from doing this. You'll need to use port forwarding or a DMZ to make this work.
|
I checked the router settings and told it to forward port 22 to 192.168.0.12 which is what my desktop shows up as. Am I on the right track?
|
most definitely
|
It didn't work after that. Is there another step?
|
remember to configure the ssh daemon to AllowRootLogin NO and perhaps add that only you can login( you can allow groups or users ). As an added blast of paranoia, I use non-standard ports( Normally a fixed number plus the last quadrant of an IP address as a port number ). If you have more than one network card, remember to only allow ssh on certain cards for security or else you leave the gate open. Good luck!
|
Umm, it should be working... are you trying to ssh to your external ip from within your lan?
|
You must configure the ssh daemon to listen-on 192.168.0.12. Hopefully you are using staic IP's behind the router as it gets more difficuly with dhcp.
|
static ip's can be configured from the router and also within the OS
|
AllowRootLogin no is a good security tip. :) Since only I use my machines, I assume that passwords and so forth are strong enough, so I feel good about that. But this is all discussion for another topic.
|
also when configuring ssh, remember to kill -9 `cat /var/run/sshd.pid` or wherever the process pid is located and the restart by usr/sbin/sshd
|
Quote:
|
Please forgive me..
Where do I got to setup SSH? |
by ssh'ing to your ISP provided ip address, the packets should be passed to your internal box. But as well the internal box must be configured to listen.
|
In OpenBSD it is /etc/ssh/sshd_config, I'm sure it something similar in fedora. Do a man sshd and it will probably tell you.
|
Alright. Will I not be able to test this until I am off of my LAN? I'll have to be at work?
|
Unfortunately, by the nature of portforwarding, it doesn't work from internal->external->internal.
FYI, There is no need to perform kill -9 on SSHD. 'kill -HUP' will force SSHD to reread it's config file. Also, most distributions will allow you to do /etc/init.d/ssh restart (or /etc/init.d/sshd, depending on distro). |
Thanks for all the help you two. I'll do my best. Hopfully it will work tomorrow because I can't test it any other way.
|
Ooh. I made progress. I had a freind help me test and it askes for the user name then password then it says connection closed by remote host once the password is entered correctly. Is that a simple setup error that could be fixed by you linux gods really fast?
|
Sounds like a router config problem to me. It sounds as if the daemon is responding. Are you using iptables on the Linux box and if so they must be configured as well?
|
This will probably make you want to give up on me but I don't know what you're talking about.. I just installed Fedorda again for the first time in a while 2 days ago..
|
I think its just a permission problem. Logging in as root work. (I know you're going to kill me for allowing that) but it does work. Where do I allow ssh to others?
|
do a >locate sshd_config or a >find / -name sshd_config -print and if there is no file ......
make sure and do a >man sshd and your problems will be revealed( this step is a must ). As well, do a >man iptables. I'm going out for a beer. If you havent figured this out in a few hours, I'll be back. Best of Luck, Daniel :) |
Yeah, I can't figure it out. I can only log in as root but nothing else. I was trying to set it up so a me and a friend could both be in but no luck I guess. :(
|
All times are GMT -5. The time now is 07:54 PM. |