How To Install SSH Server In Ubuntu Linux OS?


By default in Ubuntu SSH(Secure SHell) server is not installed. This is a big problem when you want to access the Ubuntu machines from other machines we can not access. In this post I will show you how to install and SSH server and give you some examples how to use ssh.

Installing ssh server in ubuntu
#apt-get install openssh-server
Once you install now try to login to that machine
#ssh 0

Note : In this example i am login to same machine, which i am going to check whether service is running or not. We should get successfully login for the above command which will prompt for password.

SSH examples:

Example1 : Login to a remote machine using its hostname
#ssh servername

Note : This will allow us to login to remote server on default
ssh port(22)

Example2 : Login to a remote machine using its IP add
#ssh 192.168.0.1

Example3 : Login in to a remote machine which uses different port for running ssh server
#ssh 192.168.0.1 2010

Note : Here SSH server is running on 2010 port(some times this is good practice to secure the system).

Example4 : Login to a remote machine with different user
#ssh user@192.168.0.1

Example5 : Executing commands on remote machine with out login to the machine.
#ssh 192.168.0.1 "ls -l"

Note : This command will execute "ls -l" command on remote host:192.168.0.1 and gives the output on a local machine.

SSH server is a big concept which can not be dealt with in one post. Will try to write another post on SSH server.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Related Posts by Categories



    0 comments:

    Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here