Linux02 install SSh

28
Install ssh in Ubuntu server Linux- Networking ssh is a remote protocol used in Linux and Unix system. ssh stands for S ecure sh ell, which means it provides an encrypted data transfer between a client and server. This is an improvement to the old remote protocol such as rlogin, telnet and ftp. 1

Transcript of Linux02 install SSh

Page 1: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

ssh is a remote protocol used in Linux and Unix system.

ssh stands for Secure shell, which means it provides an encrypted data transfer between a client and server.

This is an improvement to the old remote protocol such as rlogin, telnet and ftp.

1

Page 2: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

In Ubuntu, ssh package can be found in three initial packages, which are:

openssh-server - contains ssh, scp and sftp server.

openssh-client contains ssh, scp and sftp clients.

metapackage - a portable ssh server and ssh client package.

2

Page 3: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

how to install ssh package in Ubuntu server 8.10 for beginner.

1. First, you have to check whether ssh package has been installed in your Ubuntu server system.

3

2. We can use dpkg command to list installation package like the screenshot below:

Page 4: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking4

Page 5: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking5

Page 6: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

We are going to install ssh package in Ubuntu server through the Internet using apt package management system.

1. you need to check whether apt package has been install in your ubuntu server or not:

6

Page 7: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking7

Page 8: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking8

Page 9: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

Install ssh package with apt-get command syntax(format) is sudo apt-get install ssh.

1. When apt-get have the package and ready to install, it will prompt us for confirmation. Answer yes to continue, or no if you prefer other ssh package. Here is the screenshot:

9

Page 10: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking10

Page 11: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking11

Page 12: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

The ssh package installation is in progress:

12

Page 13: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

The ssh package installation is in progress:

13

Page 14: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

The ssh package installation is finish:

14

Page 15: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

The ssh package installation is finish:

15

Page 16: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

We can check ssh package installation once again with dpkg command to verify:

16

Page 17: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking17

Page 18: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

Check whether ssh daemon (service) is running with ps command like the screenshot example below. If there is no ssh daemon running, you can start ssh with sudo /etc/init.d/ssh start command

18

Page 19: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking19

Page 20: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

When ssh daemon is running, you can try ssh to your Ubuntu server from client. Below are screenshot examples of accessing ssh server.

20

Page 21: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

Accessing Ubuntu server using ssh from Slackware Linux command line terminal:

21

luzar@slackware:~$ ssh -l 192.168.0.47usage: ssh [-1246AaCfgKkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec][-D [bind_address:]port] [-e escape_char] [-F configfile][-i identity_file] [-L [bind_address:]port:host:hostport][-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port][-R [bind_address:]port:host:hostport] [-S ctl_path][-w local_tun[:remote_tun]] [user@]hostname [command]luzar@slackware:~$ ssh -l luzar [email protected]'s password:Linux ubuntu 2.6.27-14-server #1 SMP Wed Apr 15 19:44:38 UTC 2009 i686

Page 22: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking22

The programs included with the Ubuntu system are free software;the exact distribution terms for each program are described in theindividual files in /usr/share/doc/*/copyright.Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted byapplicable law.To access official Ubuntu documentation, please visit:http://help.ubuntu.com/Last login: Wed Jun 24 04:49:59 2009 from 192.168.0.133luzar@ubuntu:~$

Page 23: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

The first ssh command in the example above shows ssh usage help message.

23

This happens if we enter the wrong ssh syntax. When we get the command right such as in the second ssh command example, we'll be prompted for the user account password.

Enter correct user account password and we'll gain access into the Ubuntu server.

Page 24: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

We can also access Ubuntu server from Windows operating system using ssh by the help of a program called Putty.

You'll find this kind of warning when you first connecting into ssh server.

24

Page 25: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

This is an example screenshot of successful login into your ssh server:

25

Page 26: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking26

Page 27: Linux02 install SSh

Linux-Networking27

Page 28: Linux02 install SSh

Install ssh in Ubuntu server

Linux-Networking

That's all.

Remember that ssh is a better choice if you are going to connect remotely to your server.

28