Setting up ssh for ubuntu behind a router
I'm trying to make it so i can get files off my linux machine remotely from a windows machine. I'm using putty on my windows machine, but can't get it to connect to my linux machine. My linux machine is behind a router so I have my router forwarding a random port for ssh to use. When I use putty I go under the tunnel options and pick that port, say 34234 or whatever. I type that as source port and then type in localhost:34234 as destination and add that (where localhost is my ip address). Is ssh running by default in ubuntu, or is there something else I need to do to connect? Seems easy enough but it's not working.
I've never used Putty so I can't comment on it, but the ssh server is not generally installed on Ubuntu. To check to see if it's installed, do:
ps ax | grep ssh
You should see something like this, if ssh is running:
4692 ? Ss 0:00 /usr/sbin/sshd
If you don't, install it via apt-get.
sudo apt-get install ssh
Default port is 22. If you want to change that, you'll need to edit the following file:
Then you'll need to restart your sshd server:
sudo /etc/init.d/ssh restart
Here's a nice tutorial on ssh tunneling for Putty:
|All times are GMT -5. The time now is 10:54 PM.|