Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 11-13-2007, 03:18 AM   #1
Registered: May 2007
Posts: 47

Rep: Reputation: 15
private key for putty

anyone know how to set up the private key for putty?

wat i want is when i try to log in from putty, i just need to key in root as user, then when prompt out password, i just need to press "ENTER" key, it will make me auto login.
Old 11-13-2007, 03:23 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
just use the puttygen tool
Old 11-13-2007, 05:33 AM   #3
Registered: Apr 2005
Location: UK
Distribution: Slackware 13.0
Posts: 241

Rep: Reputation: 34
You don't even need to key in root as the user - putty has an option for auto-login username.

Google for "public key authentication ssh" and you'll get hundreds of hits back with HOWTO's - it's a long-winded process. Basically the easiest way is to use PuttyGen to generate a key, make sure you export it as both OpenSSH and Putty. Put the OpenSSH key into the .ssh folder of the user that you are using and then copy it into the authorized_keys file. Put the Putty key into Putty so that every time you choose the saved session it uses it. After you've checked it (lots) disable password-based login in sshd_config (PasswordAuthentication no) and enable public-key authentication (PubkeyAuthentication yes). You'll want to read a HOWTO because there are a lot of places to fall down if you're not looking (root logins enabled, etc. in your case).

I would suggest a passphrase on your key too but you seem to want everything automated - in that case make sure you key file is secure.

I have this set up (though not for root - be careful what you're doing). A certain saved putty session of mine connects to my server, auto-logs-in as my user using that key, the key has a passphrase, so that's needed as well, then once it's authenticated it sets up all my port-forwards etc. Basically a double-click and a passphrases sets the connection up securely and effortlessly. It also makes sure that options like Compression, SSHv2 Only etc. are enabled.

Last edited by ledow; 11-13-2007 at 05:41 AM.


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
private key conversion (putty to openssh) lostinvietnam Linux - Security 1 10-11-2006 08:01 AM
public/private key authentication with PuTTY NetAX Linux - Security 5 10-27-2004 06:00 PM
if they got my gpg private key...... qwijibow Linux - Security 1 10-21-2003 12:22 AM
RSA public key encryption/private key decription koningshoed Linux - Security 1 08-08-2002 07:25 AM
private key compromised sourian Linux - Security 4 04-17-2002 06:59 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:01 AM.

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