SSH - Secure Shell


Intro

 

My notes on SSH tools

 


Generate Public + Private Keys for SSH

 

mkdir ~/.ssh chmod 700 ~/.ssh ssh-keygen -t rsa

The private key (which you must keep secret) will be written to ~/.ssh/id_rsa. Your public key, which can be shared, will be stored in ~/.ssh/id_rsa.pub.

 

You must then copy the public key to the servers you intend to login via SSH.

 

ssh-copy-id <username>@<server hostname>

 

You can also copy the id_rsa.pub directly to the server and then append it to the authorized_keys files. The authorized keys are by default configured in .ssh/authorized_keys in the user's home directory

 

 


Other Resources

 


SSH Terminals

 

  • CygWin has SSH built in.

  • Putty

  • MobaXterm - my favorite, includes secure copy to move files between Windows and Linux

  • Windows Subsystem for Linux comes with SSH preinstalled.

 

SSH Academy’s Best free SSH clients for Windows

 


Commands

 

  • Login to remote computer.

ssh -p <optional port number> <username>@<remote hostname> Specify the identity (private key file) with the -i ssh -i sshkey.private bandit14@localhost

 

  • Copy file to remote computer

 


SSH Scanners

Â