Generate Ssh Key Rhel 6
Ad hell error generating key. Hi Folks,
I administer a RHEL server, which until recently was running RHEL 5.something. I had public keys set up so I could connect to this server from my desktop without a password (using keychain to manage the ssh-agent). The server has just been upgraded to RHEL 6.5, and for the life of me I can't get public key logins working anymore.
On my desktop, I have:
Create Ssh Key Centos 6
SSH is a service which most of system administrators use for remote administration of servers. When you install a fresh system, then at the start of the ssh service, it generates the host keys for your system which later on used for authentication. But if due to some reason you need to generate the host keys, then the process is explained below. A colleague and I were recently discussing how he preps his RHEL template VMs for use with Puppet. It inspired me to share how I prepare my Linux VMs to become a template within vSphere 6.5. The change from openssh6 - openssh7 disabled by default the diffie-hellman-group1-sha1 key exchange method. After reading this and this I came up with the changes I needed to do to the /etc/ssh/sshdconfig file: #Legacy changes KexAlgorithms +diffie-hellman-group1-sha1 Ciphers +aes128-cbc But a more wide legacy set of changes is (taken from here). Trouble with ssh public key authentication to RHEL 6.5. Semi-human readable while the latter can generate significantly more indepth reports as to the violation. Aureport should be installed.
..
-rw------- 1 gredner gredner 751 Feb 21 2011 id_dsa
-rw------- 1 gredner gredner 613 Feb 21 2011 id_dsa.pub
I pasted the contents of id_dsa.pub into ~/.ssh/authorized_keys2 on the server. There I have:
..
-rw-------. 1 gredner gredner 1.3K Dec 5 11:47 authorized_keys2
I've turned up the sshd logging level on the server for illustrative purposes. When I do:
gredner@servers password:
it prompts me for a password (not the key password, but the server password). On the server side I see in /var/log/secure:
Dec 5 12:06:22 server sshd[11620]: debug1: trying public key file /home/gredner/.ssh/authorized_keys2
Dec 5 12:06:22 server sshd[11620]: debug1: Could not open authorized keys '/home/gredner/.ssh/authorized_keys2': Permission denied
Dec 5 12:06:22 server sshd[11620]: debug1: restore_uid: 0/0
Dec 5 12:06:22 server sshd[11620]: Failed publickey for gredner from ip.addr.of.desktop port 33890 ssh2
Permission denied! But the permissions on the file are 600, it's owned by me, and the uid of 516 mentioned in the sshd log is my uid.