Presentation is loading. Please wait.

Presentation is loading. Please wait.

Getting SSH to Work Between Computers

Similar presentations


Presentation on theme: "Getting SSH to Work Between Computers"— Presentation transcript:

1 Getting SSH to Work Between Computers
(Establishing Permissions for SSH) Presented by Dave Mawdsley, DACS Linux SIG July 16, 2014

2 1 What is Secure Shell? Secure Shell (SSH) is a public/private key encrypted transfer method of authorization. The private key stays with the source computer and the public key is shared with destination computers. This tutorial next details the procedures and steps to set up SSH between a source computer and a destination computer.

3 2 Install SSH On each computer, start the terminal command line interface. Ubuntu SSHD Installation Type the following root command to install both ssh client and server: # sudo apt-get install openssh-server openssh-client so that both can use ssh in either direction. Next from the source computer generate the private & public key pair using root: # ssh-keygen -t rsa

4 The Private & Public Keys
3 The Private & Public Keys After generating the public and private keys with: # ssh-keygen -t rsa A sample of what you'll see: Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: cb:17:d8:17:b3:ff:9f:b5:a1:c6:1c:cb:4f:ba:5e:7f

5 SSHD Configuration 4 SSHD Configuration
Your server is ready by default. Just test it from your home computer or from same system with the root command: # ssh localhost

6 5 Moving the Public Key To work, the public key id_rsa.pub of the source computer must be stored in the destination computer's .ssh folder to prevent a password prompt when a command that uses it occurs. Further, I suggest that id_rsa.pub should first be stored as key.txt in the destination computer's <user home folder>/.ssh --and then it must be added to the executable authenticated_keys text file in that same folder. While in that .ssh folder, I suggest the following append: $ cat key.txt >> authenticated_keys (Note: if the file authenticated_keys isn't present, the file will be made.)

7 Final Thoughts 6 1. Everything depends upon the public and private key pair of SSH. 2. The private key (without the .pub) should never be shared. Both public and private keys should be stored preferably on a memory key in a banksafe deposit box. This is particularly important if many computers must rely on the public key. 3. The use of scp, sftp or rsync requires that ssh be used even if it is not nvoked in the command string such as rsync -r -t -p -o -v –progress -l /home/madmod/Desktop/pw/ /media/ABBC-DC6D/Documents/pw/ 4. It's considered risky to allow ssh if the destination is a server. SSH logins using root to servers create a path for possible intruder logins. 5. The private key id_rsa represents the “identity” or “user” of single computer which is at a base or primary level of absolute trust.

8 Getting SSH to Work Between Computers
(Establishing Permissions for SSH) This Presentation 'sshstart.odp' can be downloaded from


Download ppt "Getting SSH to Work Between Computers"

Similar presentations


Ads by Google