Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Ubuntu version 11 not too long ago. I now have that computer running on my home network and it has it's own internal IP address on my home network behind a LinkSys Router. How can I configure that Linux machine and my network settings so that I can SSH (using an emulator like Putty or Reflection) into that machine?

I'd rather not use VNC just to get access to its console Window.


Update 4/20/2012 @ 3:16pm


Pinging with 32 bytes of data:
Reply from bytes=32 time=2ms TTL=64
Reply from bytes=32 time=2ms TTL=64
Reply from bytes=32 time=1ms TTL=64
Reply from bytes=32 time=1ms TTL=64

Ping statistics for
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 2ms, Average = 1ms

share|improve this question
Use a key pair to log on from the Internet, do not allow passwords! I have too little time on my hands right now to give a complete answer, but please take my advise on this one. – jippie Apr 20 '12 at 19:48
up vote 0 down vote accepted

Install the openssh-server package.

If you want your machine to accessible from the outside world, you'll want to forward a port - the destination is port 22 on your computer; the source port can be anything.

If you only want it to be accessible on your home network, DON'T forward the port.

I'd also set up SSH keys, and possibly turn off password logins altogether.

You may also wish to install fail2ban or some other sort of access-control system (fail2ban checks for repeated failed logins & bans the IP with firewall rules.)

share|improve this answer
I am now forwarding (Ubuntu machine) in my port forwarding section of my LinkSys Router on port 22. When I try to Putty via SSH to that IP address, I get an error that says "Network error: Connection refused" – MacGyver Apr 20 '12 at 20:13
I'm able to ping that machine now, but Putty still won't connect (see update @ 3:16pm in question) – MacGyver Apr 20 '12 at 20:17
Dumb question - did you install openssh-server? It's not installed on the desktop distribution by default. – Adrian Apr 20 '12 at 20:43
That is an excellent question for me (a person who has 0 networking experience). Thanks for asking. :-) +1 – MacGyver Apr 20 '12 at 20:50
For those reading, it is not required to setup port forwarding on your router. I wouldn't recommend doing so because the outside world can access your linux box then. – MacGyver Apr 20 '12 at 21:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.