movie rental service
movie downloads.

Accessing a Network of Ubuntu Servers Remotely

July 3, 2007 – 1:44 am

I 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:

  1. Choose a port (use this for guidance)
  2. Forward this port to the IP of the second computer using your router settings
  3. Make a backup of your sshd configuration file
    1. sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
  4. Modify the configuration file to listen to the new port you selected
    1. sudo vi /etc/ssh/sshd_config
    2. Change Port 22 to Port [port you selected]
  5. Restart the sshd server
    1. 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]

  1. One Response to “Accessing a Network of Ubuntu Servers Remotely”

  2. 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

Post a Comment