Using a text editor, create a file in which to store your private key. This example uses the file private_key.txt. To edit the file in nano, type the following command # nano deployment_key.txt Paste the private key into the file. Be sure to include the BEGIN and END lines. —–BEGIN RSA PRIVATE KEY—– MIIEowIBAAKCAQEAx9ODcgSZFhPnZmW/VGWy/bXLKFBhOoTP9k4dhcJq17ZuG9KB … Read more about Log in with an SSH private key on Linux[…]
OpenSSH: You need to enable TCPKeepAlive yes In your client ssh_config (e.g. /etc/ssh/ssh_config or in ~/.ssh/config) and your destination SSH server running OpenSSH (e.g. /etc/ssh/sshd_config). So every time your connection idles, OpenSSH sends some dummy packet to your destination host Login to the server and run this: # nano /etc/ssh/sshd_config Uncomment this line #TCPKeepAlive yes Read more about How can I keep my SSH sessions from freezing CentOS 6[…]
Source: http://www.howtogeek.com/121650/how-to-secure-ssh-with-google-authenticators-two-factor-authentication/ Also, for CentOS: http://www.tecmint.com/ssh-two-factor-authentication/ Want to secure your SSH server with easy-to-use two-factor authentication? Google provides the necessary software to integrate Google Authenticator’s time-based one-time password (TOTP) system with your SSH server. You’ll have to enter the code from your phone when you connect.
Error ssh_exchange_identification: Connection closed by remote host Solution: Restart ssh. service sshd restart
Want to change the ssh port for ssh? Here is a good tutorial. (Note: If you are making these changes – ssh to the server and keep the terminal open as you make the changes. Test with a new terminal. This way if something is amiss – you are not locked out.) Edit /etc/ssh/sshd_config, enter: Read more about Change OpenSSH Port CentOS[…]