# SSH
Your ssh key should never leave a host. That should be a policy and you should write rules to detect when that policy is being violated (check for processes accessing the file).
If you need access from N computers you should be generating N keys. - HN
List identity
Find and take a note of your public key fingerprint, to recognize which key belong to who.
You might need to start ssh-agent before you run the ssh-add command (SO):
Copy ssh keys to another machine - askubuntu
Alternative for key copied locally
Changing SSH key passphrase
SSH Quoting
Disable password access
If you want to fully disable password-based authentication, set BOTH PasswordAuthentication and ChallengeResponseAuthentication to ‘no’… since SSH is a network-based protocol, the server has no way to guarantee that responses to ChallengeResponseAuthentication (a.k.a. ‘keyboard-interactive’) are actually being provided by a user sitting at a keyboard so long as the challenge(s) always and only consists of asking a user for her password.
Test that it works
Keep SSH session
- EternalTerminal (et)
- install both on client and host (need a server)
- mosh
http://byobu.co/index.html
Enable SSH server
Generating a new ssh key
Use one key per origin host, no need to change the default file.
- Add comment to existing SSH public key - Just add a space after the key and put in the comment
- How do I retrieve the public key from a SSH private key?
References
- How often should I rotate my SSH keys?
- How do you manage your SSH keys?
- SSH: Best practices
- SSH port fluxing / Github
- Ctrl-C handling in SSH session -
ssh -t remotehost command args ...