Q. I have just installed Ubuntu 6.06 and I would like to allow remote login to my system from home via ssh. How do I install and configure SSH server?
A. OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions.
Ubuntu SSHD Installation
Type the following two command to install both ssh client and server:
# sudo apt-get install openssh-server openssh-client
SSHD Configuration
To be frank your server is ready by default. Just test it from your home computer or from same system with the command:
# ssh localhost
OR
# ssh user@your-server-ip-address
How do I use ssh client?
Assuming that your server hostname is userver.mydomain.com and username is vivek, you need to type the following command:
# ssh vivek@userver.mydomain.com
To stop ssh server, enter:
# sudo /etc/init.d/ssh stop
To start sshs server, enter:
# sudo /etc/init.d/ssh start
To restart ssh server, enter:
# sudo /etc/init.d/ssh restart
See also:
- Setup SSH to run on a non-standard port
- SSH Public key based authentication - How-to?
- How to force sshd server to display login banner before login (change the ssh server [sshd] login banner)?
- Read the man page of sshd, sshd_config for more information
- Email FAQ to a friend
- Printable version
- Rss Feed
- Last Updated: 11-19-07

{ 12 comments… read them below or add one }
Nice detailed tutorial. I managed to get it all working. I wrote about it in my blog http://my-linux-server.blogspot.com
Very helpful tutorial. Thanks much!
TG
Thanks for the write-up. Odd its not installed by default.
Thank you! Up-and-running in less than 5 minutes.
:o)
Thanks a lot – this is very helpful
where can I find my ip address, I use the wireless network provided to me by my college.
when I do
“ifconfig”
I get
eth1 inet addr:10.XXX.XXX.XXX
and
lo inet addr:XXX.XXX.XXX.XXX
now from remote, when I try
ssh @10.XXX.XXX.XXX
its refuse to except my password.
also, from the other blog, i edited /etc/ssh/sshd_config file and I added line
AllowUsers
but its still not working. which IP address I am suppose to use.
also, when I open a website, which gives IP address, it shows my IP address as
127.XXX.XXX.XXX
which is different from 10.XXX.XXX.XXX which i get using “ifconfig”
Thanks
Great! Thanks for the info, i need to update my sourcelist to begin with the installation.
Devvrath: Use your external ip, not the local ip, if both you and the server is localy, you can connect to the lokalip of the server, if your not local, use the external ip,
thanks for the quality information
however mine still not working
it displays package not available
why are the ubuntu iso,s so outdated
I m enable to install ssh on ubuntu 7.0 any body have idea about it
Thanks
BOB
Hi,
My system is isolated from the Internet. How do I get and install OpenSSH in this env?
Thanks,
Gang