Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »


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

  • 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

scp localfile.txt <username>@<remote hostname>:<path in remote file system>

  • No labels