Log in with an SSH private key on Linux

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[…]

Posted in SSH

How can I keep my SSH sessions from freezing CentOS 6

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[…]

Posted in SSH

How to Secure SSH with Google Authenticator’s Two-Factor Authentication

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.