Accessing a Network of Ubuntu Servers Remotely
July 3, 2007 – 1:44 amI have two Ubuntu servers at home that I use for ThemBid.com development testing. I needed to be able to access both through SSH. The problem is that both machines are listening to the default SSH port 22 by default. Following are the steps necessary to access both via SSH.
The first computer will be left alone. I can already access it using SSH (see this article for help). For the second computer, I followed these simple steps:
- Choose a port (use this for guidance)
- Forward this port to the IP of the second computer using your router settings
- Make a backup of your sshd configuration file
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
- Modify the configuration file to listen to the new port you selected
sudo vi /etc/ssh/sshd_config- Change
Port 22toPort [port you selected]
- Restart the sshd server
sudo /etc/init.d/ssh restart
Now you can use Putty from a Windows environment (make sure to change the default port 22 to the port you selected) or via the command line from within Linux or Cygwin: ssh [username]@[servername] -p [port you selected]
One Response to “Accessing a Network of Ubuntu Servers Remotely”
I fail to see any need for changing the SSH port, unless you use the same FQDN servername or IP address for multiple boxes and then the behavior is indeterminate even with different port assignements…
By Web Monster on Jul 4, 2007