Skip to main content

Command Palette

Search for a command to run...

Useful ssh commands

Just a reference for myself ๐Ÿ™Š

Published
โ€ข1 min read
Useful ssh commands
R

Hi, I am a cloud engineer from Barneveld, The Netherlands. I specialize in AWS but also do some backend and frontend development.

I am currently employed full-time and am a mentor at CoderDojo Amersfoort, The Netherlands.

Please feel free to get in touch if you have any questions for me.

Create key:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Add key to ssh-agent:
ssh-add ~/.ssh/id_rsa

Copy key to remote server:
ssh-copy-id -i ~/.ssh/mykey user@host

copy files over ssh

Local to remote:
scp -r /path/from/destination username@remotehost:/path/to/destination

Remote to local:
scp -r username@remotehost:/path/from/destination /path/to/destination

Local file to remote:
scp foobar.txt username@remotehost.edu:/some/remote/directory