This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computing:ssh [2018/05/18 08:13] – oemb1905 | computing:ssh [2021/10/15 17:53] (current) – oemb1905 | ||
---|---|---|---|
Line 7: | Line 7: | ||
------------------------------------------- | ------------------------------------------- | ||
- | Keep those public and private key pairs protected ... and where they are located! | + | Generate keys |
+ | |||
+ | ssh-keygen | ||
+ | |||
+ | Send your public key to trusted parties by copying the output below. | ||
+ | |||
+ | 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. | ||
+ | |||
+ | 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. | ||
chmod 700 ~/ | chmod 700 ~/ | ||
Line 14: | Line 34: | ||
chmod 755 ~/ | chmod 755 ~/ | ||
- | Using with screen | + | Using with screen |
ssh -t xx.xx.xx.xx screen -DRO | ssh -t xx.xx.xx.xx screen -DRO | ||
+ | | ||
+ | config options for / | ||
+ | | ||
+ | Port 53535 | ||
+ | PubkeyAuthentication yes | ||
+ | PasswordAuthentication no | ||
+ | PermitRootLogin prohibit-password | ||
+ | Protocol 2 | ||
+ | AllowUsers sally | ||
+ | AllowUsers johnny | ||
+ | PermitEmptyPasswords no | ||
+ | X11Forwarding yes | ||
+ | PrintMotd yes | ||
+ | ChallengeResponseAuthentication no | ||
+ | UsePAM yes | ||
+ | | ||
+ | Then, always restart the service | ||
+ | | ||
+ | sudo systemctl restart sshd.service | ||
+ | | ||
+ | |||
+ | |||
+ | |||
+ | --- // | ||