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


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.

Objectives:

  • 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

 

openssh_server_precise

 

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

 

openssh_server_precise_1

 

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.

 

openssh_server_precise_2

 

Enjoy!

 

openssh_server_precise_3

 

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


Please share if you like it on:



Leave a Comment

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

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

  • Gagandeep Bali

    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

  • Richard A. Allcorn

    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?

  • shuggans

    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

  • ravinder

    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 …

  • Anthony

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

    • Max

      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 89.89.9.123:2222 -> 10.10.10.90:2222.

      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 10.0.0.0 (class A) is all private.

  • mugdha

    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.

  • Nuke

    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?