To test, you will need a client and test server. The client server is where we generate the keys. When we generate keys, there will be a private key and a public key. Then we copy the public key to the test server. When we ssh to the test server, the private key we have ..
Log into the Linux server as the user you are going to use to connect with ssh. Generate the key. ssh-keygen -t rsa -b 4096 -C “firstname.lastname@example.org” Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been ..
Generating OpenSSH-compatible Keys for Use with PuTTY To generate a set of RSA keys with PuTTYgen: Start the PuTTYgen utility, by double-clicking on its .exe file; For Type of key to generate, select RSA; In the Number of bits in a generated key field, specify either 2048 or 4096 (increasing the bits makes it harder ..
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 … ..
Here is how to keep your ssh session from freezing and how to keep ssh alive. Edit your ssh config file. Change to the following variables # nano /etc/ssh/sshd_config TCPKeepAlive yes ClientAliveInterval 60 ClientAliveCountMax 10000 Then, restart ssh On CentOS: # service sshd restart Stopping sshd: [ OK ] Starting sshd: [ OK ] TCPKeepAlive ..
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 yo..
Error ssh_exchange_identification: Connection closed by remote host Solution: Restart ssh. service ss..
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: ..