Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-13-2011, 07:32 PM   #1
Registered: May 2008
Posts: 89

Rep: Reputation: 15
How to create "SSH Key"

I've read tutorials on doing this and found it too difficult.

Id like to create a SSH Key on a Redhat box. Can you provide step by step example how to? What if authorized keys exist already on the server? Please advise! Thankyou
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-13-2011, 07:45 PM   #2
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
Well, say you want to use key-based authentication to log in from machine A to machine B, you need to:

1) Run ssh-keygen on machine A, this will create or file under /home/[yourusername]/.ssh on machine A.

ssh-keygen will ask you to set a passphrase for the key, if you don't want one (which is likely the case), just hit enter.

2) Open authorized keys file on machine B (under /home/[yourusername]/.ssh directory) to your favourite text editor. If the file isn't there yet, just create it.

3) Display the contents of id_? file by doing: "cat $HOME/.ssh/id_?" on the terminal on machine A. Without the quotes, of course.

4) Copy-paste the contents of id_? to the end of authorized_keys file on the text editor. Save and exit.

There are plenty of other ways of doing this, but I think this is the easiest.

Last edited by alienDog; 02-13-2011 at 08:06 PM.
2 members found this post helpful.
Old 02-13-2011, 08:44 PM   #3
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15
Thank you! I'm still reading up on this. What is Machine A is a Windows machine using Putty?
Old 02-13-2011, 09:11 PM   #4
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,529

Rep: Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896
Try - 'putty create ssh key' in google ... has quite a few good hits
Old 02-13-2011, 09:16 PM   #5
Registered: Apr 2008
Location: UK
Distribution: Mepis; Maemo; openSUSE
Posts: 384
Blog Entries: 74

Rep: Reputation: 81
There's a good guide on the PuTTY site.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH Putty "Server's host key did not match the signature supplied" bala150985 Linux - Networking 20 05-26-2016 03:31 PM
automount 5.0.3 with auto.smb script yields "key "<name>" not found in map" rbergen Linux - Software 0 01-01-2010 12:27 PM
"Enter Key" not working, how to map "Enter Key" functionality to "F9" Key srinihi Linux - Newbie 1 04-03-2009 02:46 PM
"Installing non-distro Linux on USB key" or "Using syslinux to boot a jffs2" lymae Linux - Newbie 6 12-31-2006 10:00 PM
How to create a "jail" to a SSH server? Qantt Linux - Security 2 10-04-2006 01:28 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration