User Tools

Site Tools


computing:ssh

This is an old revision of the document!



  • ssh
  • Jonathan Haack
  • Haack's Networking
  • netcmnd@jonathanhaack.com

Generate keys

ssh-keygen

Send your public key to trusted parties by copying the output below. Code Talkers should email them to netcmnd

cd ~/.ssh/
cat id_rsa.pub

If you emailed me your key, I can add you to the Code Talkers Hacking Club Git Lab. Now, you should enable your digital ocean vps for ssh as follows

ssh-copy-id username@xxx.xxx.xxx.xxx

That's it - you should now no longer need to enter your password. If this is not working, check your configuration using the commands below and try again. You might need to enable public key authentication.

cd /etc/ssh/
sudo nano sshd_config
sudo systemctl restart sshd.service
sudo systemctl restart ssh.service

Keep those public and private key pairs protected. If you did not change anything, they have the permissions below. But we all make mistakes!

chmod 700 ~/.ssh 
chmod 644 ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
chmod 755 ~/

Using with screen … more later

ssh -t xx.xx.xx.xx screen -DRO

config options for /etc/ssh/sshd_config

Protocol 2
AllowUsers user
PermitRootLogin no

sudo systemctl restart sshd.service

oemb1905 2018/05/19 20:03

computing/ssh.1553488436.txt.gz · Last modified: 2019/03/25 04:33 by oemb1905