Slide 1

Slide 1 text

Basics of SSH and key-pair

Slide 2

Slide 2 text

Contents ● SSH ● Public key pair Authentication ● Uses of SSH ● Securing devices 2

Slide 3

Slide 3 text

SSH (Secure Shell) 1. Managing networks, configuration and operating system. 2. Used by many file transfer tools and configuration management tools. 3. Mainly used to connect to remote devices. 4. Port 22. 3

Slide 4

Slide 4 text

Why Public Key authentication ? ● one of the way to authenticate yourself other than password based authentication ● provides cryptographic strength that even extremely long passwords can not offer ● free users from remembering complicated passwords ● Allows automated, passwordless login to perform many tasks on the server. 4

Slide 5

Slide 5 text

Key pair - Public and Private ● Generating a ssh key pair includes two keys: public key and private key ○ Public Key ■ copy into the server, specifically in authorized_key file. ○ Private Key ■ Remains only to user ■ It is the proof of the users’ identity ■ Also known as identity key ● most common algorithm are RSA ● New algorithm is used: Ed25519 5

Slide 6

Slide 6 text

How does SSH public key authentication works? 6

Slide 7

Slide 7 text

Uses of SSH ● Remote Shell Access ○ ssh username@hostname ● Secure File Transfer (SCP) ○ scp local_file username@hostname:remote_path ● Secure File Synchronization (rsync) ○ rsync -avz -e "ssh" source_directory username@hostname:destination_directory ● Tunneling and Port Forwarding ○ ssh -L local_port:remote_host:remote_port username@hostname 7

Slide 8

Slide 8 text

Uses of SSH ● Execute remote commands ○ ssh username@hostname "command" ● Git and Version Controls ○ git@hostname:username/repo.git ● Secure File Transfer (SFTP) ○ sftp username@hostname 8

Slide 9

Slide 9 text

Securing devices ● Disabling root login ● Disabling password authentication (if using keys) ● Securing private key ● Changing ssh port ● Limit user access Note: ssh configuration file path - /etc/ssh/sshd_config 9

Slide 10

Slide 10 text

Thank You 10