LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-13-2011, 08:32 PM   #1
JeffC1
Member
 
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, 08:45 PM   #2
alienDog
Member
 
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 id_dsa.pub or id_rsa.pub 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_?sa.pub file by doing: "cat $HOME/.ssh/id_?sa.pub" on the terminal on machine A. Without the quotes, of course.

4) Copy-paste the contents of id_?sa.pub 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 09:06 PM.
 
2 members found this post helpful.
Old 02-13-2011, 09:44 PM   #3
JeffC1
Member
 
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, 10:11 PM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,255

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
Try - 'putty create ssh key' in google ... has quite a few good hits
 
Old 02-13-2011, 10:16 PM   #5
rich_c
Member
 
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.
 
  


Reply


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 04:31 PM
automount 5.0.3 with auto.smb script yields "key "<name>" not found in map" rbergen Linux - Software 0 01-01-2010 01:27 PM
"Enter Key" not working, how to map "Enter Key" functionality to "F9" Key srinihi Linux - Newbie 1 04-03-2009 03:46 PM
"Installing non-distro Linux on USB key" or "Using syslinux to boot a jffs2" lymae Linux - Newbie 6 12-31-2006 11:00 PM
How to create a "jail" to a SSH server? Qantt Linux - Security 2 10-04-2006 02:28 AM


All times are GMT -5. The time now is 02:15 AM.

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