Enable SSH (Secure Shell) in Ubuntu 12.04 (Precise Pangolin)

This brief tutorial shows you how to enable SSH in Ubuntu 12.04 Precise Pangolin. This request came in from one of our readers who wanted to know how to enable SSH in Ubuntu 12.04. As you may already know, SSH is a secure communication protocol that lets you remotely access networked computers. It is known as a replacement for Telnet which is very unsecure. While Telnet sends traffic in plain text, SSH on the other hand uses a secure protocol to communicate.


  • Enable SSH in Ubuntu 12.04
  • Enjoy!

To get started, press Ctrl – Alt – T on your keyboard to open Terminal. When it opens, run the commands below to install SSH Server.

sudo apt-get install openssh-server


Enhance your coding experience with this split keyboard that offers up to 9" of separation.



That’s it! Use your SSH clients to connect to your machine using the default port 22. If you wish to change the connection port, run the commands below to open the configuration file.

sudo gedit /etc/ssh/sshd_config




Then change the port # shown to whatever you want and save the file. But remember to use the new port number every time you want to connect to your system via SSH.








For a simple and quick SSH client, click here to download Putty.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Invest in some screen real estate with a new big screen, backlit monitor availabe in five different sizes and price points.

25 thoughts on “Enable SSH (Secure Shell) in Ubuntu 12.04 (Precise Pangolin)”

  1. Thankyou mate :-) Nice set of words, along with the way it explained the whole concept, made it too easy for me, to work with the problem I was facing, before reading this article.

    Now everything is working like a charm, as I was hoping :-)

    Thankyou again

    1. What a comment!
      Useless person like you make a useless comment!
      Go kill your parents, then kill yourself!

  2. I must be missing something but I cannot remotely login to my Ubuntu system with SSH. When I try I get a message saying that I am “not authorized”. Password part works fine, but it’s like I don’t have “shell access” authorization. I have the same problem with Mac OSx.

    There’s got to be something I’m overlooking here …
    I’ve even uninstalled and re-installed openSSH (sshd) and still have the same issue. Previously, with Ubuntu, openSSH worked right out of the box! (now using v13)

    Ideas? Suggestions?

  3. You will also need to allow port 22 (or whatever port you change to if you change it) through ufw if it is enabled: sudo ufw allow 22

  4. Ya its good, now i am able to use a putty session in ubuntu also but can u Please tell me how to increase font size in ubuntu …

  5. Hi, This article works fine for me but I’m having a slightly different issue, as I am new to Ubuntu or Linux in general.

    I have an Ubuntu server with IP which is hosting an application on port 8069, I have configured the SSH on the Ubuntu server to use port 2222, how can I remotely connect to the application on the ubuntu server from a different network.

    Please help.

    1. to conect from a remote location to your local ip address you need to access your gateway (router, server, or whatever device your WAN connection is directly connected to) and make a port forward on it (some call it virtual server or some other things). mainly what you need to do is access your WAN ip on a certain port and tell your gateway to link it to a certain port on a certain local machine. for eample ->

      hope this helps.

      PS: there is no way to directly connect to a LAN private ip directly from the internet. that’s why they are called private IPs. and (class A) is all private.

  6. I have configured a machine in my lab as a server and i want to open file stoed on that machine. Can you please help me with the commands needed to do so.

  7. Sorry, this left me confused until I looked at another site. Came back here to leave comment. The advice here, as the title does NOT make clear, is for setting up a SSH server, NOT a client. I had not even realised till I looked elsewhere that the server and client WERE separate software, had assumed that they were combined. As for setting up a server, this falls well short of advising on setting up the permissions user in its config file.

    Re-reading, your last line does hint that the client is a separate thing, by mentioning Putty. But as you advise openssh-server, is there anything against openssh-client?

  8. Hi There,

    I am able to connect the remote server by using RDC(Remote Desktop Connection). But when I tried to connect the same server by using telnet or ssh i am not able to connect it. What might be the problem causing for it.


  9. Simple and to the point. Usually when searching for commands, I am seeking the just that — the commands. The succinct explanation is a great.

  10. Hi, I’m getting an error with sudo apt-get install ssh.

    error: 404 Not found [IP:]
    Enable to fetch some archives.

    I even tried openssh. It also gives same error. Can anyone give some suggestions to fix this error.

Leave a Reply

Your email address will not be published. Required fields are marked *