Tuesday, 27 August 2024

ssh keys with redhat

How to use ssh keys with putty and Red Hat Enterprise Linux ? Solution Verified - Updated August 6 2024 at 5:40 AM - English Environment Red Hat Enterprise Linux (RHEL) 6.3 Issue SSH Keys generated by Putty do not work with openssh in Red Hat Enterprise Linux Resolution To make it working convert the keys generated by Open-ssh to putty's format: First generate keys on RHEL: Raw # ssh-keygen -t rsa Then put public key into authorized_keys file: Raw # cat public_key >> ~/.ssh/authorized_keys Set proper permissions: Raw # chmod 700 ~/.ssh # chmod 600 ~/.ssh/authorized_keys Copy (for example with Winscp) private key into Windows machine. Start the program called "puttygen", select "conversion" --> "Import keys" --> "your_private_key". Save it somewhere in putty format. Note: In order to use the converted key please create new putty session and fill the following fields: "auto-login username" (username you wish to use as login) . "connection" --> "ssh" --> "auth" --> "browse" (here please point to your newly generated putty key)--> "session" --> "save". Root Cause

No comments:

Post a Comment