SSH for Remote Server Authentication
- Generate a new key
- Config file
- Copy SSH key to Remote server
- SSH into a machine
- Verify Fingerprints
- Copy files over SSH
- Audit SSH logs
- Port forwarding with SSH tunnel
- Lock down incoming SSH connections
Note:
- Never share your private key with anyone. That's your identification
- Feel free to share your public key with anyone or any server.
- Last part of the content of public key is a comment to document which public key it is. Feel free to change it anytime. Comment is helpful in keeping track of servers using different keys.
SSH escape sequences and codes
Little known feature. These hidden sequences allow you to unstick a frozen terminal window, keep a remote SSH session open in the background, and more
Type ~(tilda) + .(period) to exit from a frozen terminal window
To keep an ssh connection open but not occupy the terminal window.
This will suspend ssh connection in the background
Type ~(tilda) + Ctrl z
To reconnect back to the suspended connection
$ fg
Questions
1. How is userid/pwd different from ssh to the server as above?
Resources
- egghead.io SSH for Remote Server Authentication