Wednesday, September 3, 2014

How to install SSH Server on Lubuntu

In this article i will show you how to install SSH server on lubuntu 14.04 and also how to use it. This guide should also works for ubuntu, kubuntu, edubuntu, xubuntu, etc.

To install SSH server, you need to open the terminal (LXTerminal), press CTRL + ALT + T on your keyboard, the terminal will pop-up immediately, and then type this :

sudo apt-get install openssh-server

You will be prompted for root password and then it will download the package from the repository, so make sure the internet works.

kernelpanic@lubuntulaptop:~$ sudo apt-get install openssh-server [sudo] password for kernelpanic: Reading package lists... Done Building dependency tree       Reading state information... Done The following extra packages will be installed:   ncurses-term openssh-client openssh-sftp-server python-requests   python-urllib3 ssh-import-id Suggested packages:   ssh-askpass libpam-ssh keychain monkeysphere rssh molly-guard The following NEW packages will be installed:   ncurses-term openssh-server openssh-sftp-server python-requests   python-urllib3 ssh-import-id The following packages will be upgraded:   openssh-client 1 upgraded, 6 newly installed, 0 to remove and 245 not upgraded. Need to get 1,271 kB of archives. After this operation, 3,841 kB of additional disk space will be used. Do you want to continue? [Y/n] Y

That's the ssh server, to connect to ssh server, we need ssh client, most linux distro already comes with ssh client, so we don't need to install it.


How to connect to ssh server

To connect to ssh server, we can use the ssh command, that's the name of the ssh client program, and of course we need to run it from the console.

ssh command :
ssh [username]@[ssh server ip address]

example :
ssh guest@10.13.201.75 
ssh root@192.168.88.89 
ssh root@localhost
ssh jenny@localhost

You will be prompted for password, enter the password for that username, it's the one that you use to login.

You can also create new user (see my previous article), the new user you just created will automatically available for ssh login.

You can also connect from windows OS, if you're using windows as the client, you'll need a program called PuTTY.
 
Putty is a free ssh and telnet client on windows, besides windows OS, you can also connect to ssh server from android smartphone/tablet.

You need to install ssh client on your phone/tablet and make sure the phone/tablet is on the same network as the ssh server.


How to exit ssh server

To exit from ssh server is very simple, type exit command and it will close the connection, if that's doesn't work, press CTRL + C.

exit 

How to copy data to ssh server

You can copy data from your local computer to ssh server by using scp command, just like this :

scp [filename] [username]@[ssh server ip address]:/[path]

example :

scp readme.txt jenny@10.13.201.75:/home/jenny/ 
scp movie.mp4 jenny@192.168.1.33:/home/jenny/movies/
scp logo.png root@192.168.1.33:/tmp/

How to copy data from ssh server

You can also copy data from ssh server to your local computer, also using scp command, just like this :

scp [username]@[ssh server ip address]:/[path]/[filename] [path on local computer]

example :
scp jenny@10.13.201.75:/home/jenny/fun.jpg /home/
scp jenny@10.13.201.75:/tmp/config.txt /home/lucy/work/
scp root@10.13.201.75:/tmp/movie.avi /home/jenny/

No comments:

Post a Comment