What Is OpenSSH

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

What is OpenSSH?

OpenSSH is the premier connectivity tool for remote login with the SSH protocol. IT encrypts all traffic to
eliminate eavesdropping, OpenSSH provides a large suite of secure tunneling capabilities, several
authentication methods, and sophisticated configuration options.

Ther OpenSSH suite consists of the following tools

 Remot operation are done using ssh, scp and sftp.


 Key management with ssh-add, ssh-keysing, ssh-keyscan, and ssh-keygen.
 The service side consist of sshd, sftp-server and ssh-agent

OpenSSH

 Package name = Openssh


 Service name = sshd
 Port number = 22
 Server Config path = /etc/ssh/sshd_config
 Client Config path = /etc/ssh/ssh_config
 Login types = password & key generation
 Key gen path = /userhomedir/.ssh

Modules in this lesson

 OpenSSH : Password Authentication


 Remote Login (Linux and Windows Client)
 OpenSSH : SSH File Transfer (SCP)
 OpenSSH : SSH File Transfer (SFTP)
 OpenSSH : SSH File Transfer (Windows Client)
 Openssh : SSH Key-Pair Authentication Linux Client
 SSH key-Pair Authentication from Windows Cleint

OpenSSH : Password Authentication

#vi /etc/ssh/sshd_config

permitRootLogin no

#systemctl restart sshd

Disable Firewall

Disable SELinux

#firewall-cmd –add-service=ssh –permanent

Success

#firewall-cmd –reload

Success
SSH File Transfer (SFTP)

Example for using SFTP (Secure File Transfer Protocol)

#sftp [email protected]

[email protected]’password:

sftp>

sftp>pwd (Current directory on remote server)

sftp>!pwd (Current directory on local server)

sftp>ls-alh

sftp>lls-alh

sftp>ls-alh

sftp>put text.txt (upload a file to remote server)

sftp>get.lol.txt (download a file from remote server)

sftp>put *.txt

sftp>get *.txt

OpenSSH : SSH File Transfer (SCP)

Example for using SCP (Secure Copy)

Copy file (test.txt) on local to remote server [lollinux.com]

#scp ./test.txt [email protected]:~/

[email protected]’s password: user’password

Test.txt 100% 10 0.0KB/s 00:00

#copy the [/home/name/text.txt] on remote server [lollinux.com] to the local

#scp [email protected]:/home/sharthu/test.txt./test.txt

[email protected]’s password:

Test.txt 100% 10 0.0KB/s 00:00


#vi /etc/ssh/sshd_config
Openssh : SSH Key-Pair Authentication Linux Client
#line
Server#ssh-keygen –t ssa
passwordAuthentication no
Server#mv ~/.ssh/id_rsa.pub~/.ssh/authorized_keys
#systemctl restart sshd
Client#mkdrir ~/.ssh

Cleent#chmod 700 ~/.ssh

#copy the secret key to local ssh directory

#scp name@mci:/home/name/.ssh/id_rsa ~/.ssh/

name@mci’s password:

client#ssh –i ~/.ssh/id_rsa name@hostname

Enter passphrase for key ‘/home/cent/.ssh/id_rsa’: # passphrae

You might also like