LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-12-2011, 11:50 AM   #1
garyozzy
Member
 
Registered: Jun 2005
Distribution: RHEL, CentOS, Debian, Ubuntu, Arch
Posts: 181

Rep: Reputation: 30
ssh asking for passphrase when I didn't set one


I set up a git user on my server according to this guide,

http://scie.nti.st/2007/11/14/hostin...and-secure-way

It's all good until I try to clone the git repository I made.

Code:
$ git clone git@HOSTNAME:gitosis-admin.git
Cloning into 'gitosis-admin'...
Enter passphrase for key: 
Permission denied (publickey). 
fatal: The remote end hung up unexpectedly
It asks for a passphrase, but when I made the key (using PuTTYGen) I didn't put one in there.

When I try to ssh (not using git),

Code:
$ ssh git@HOSTNAME
Enter passphrase for key: 
Permission denied (publickey).
Obviously, in both examples I've put my own hostname in. Other users can ssh in just fine.

Any ideas?
 
Old 12-12-2011, 12:36 PM   #2
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
I've got a few ideas for you

a) Gitosis is abandoned - use gitolite instead
b) check your /etc/passwd - gitosis from repos on Ubuntu, for example, is under user 'gitosis', not 'git', so it will be ssh gitosis@HOSTNAME
c) ssh git@HOSTNAME - that won't work in any case as Gitosis prevents direct shell login to 'gitosis' user.
 
Old 12-13-2011, 04:00 AM   #3
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
What is the output of:
Code:
$ ssh-keygen -y
This will recreate the public part out of the private part (e.g. in case you lost the public part). If there is a passphrase, it will ask. Otherwise not.
 
Old 12-13-2011, 03:20 PM   #4
garyozzy
Member
 
Registered: Jun 2005
Distribution: RHEL, CentOS, Debian, Ubuntu, Arch
Posts: 181

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by klearview View Post
I've got a few ideas for you

a) Gitosis is abandoned - use gitolite instead
Thank you. I did not know that and am switching to gitolite.

Quote:
Originally Posted by klearview View Post
b) check your /etc/passwd - gitosis from repos on Ubuntu, for example, is under user 'gitosis', not 'git', so it will be ssh gitosis@HOSTNAME
I installed it from source, but thank you, good to know.

Quote:
c) ssh git@HOSTNAME - that won't work in any case as Gitosis prevents direct shell login to 'gitosis' user.
Also good to know.

Quote:
Originally Posted by Reuti
What is the output of:
Code:
$ ssh-keygen -y
It appears this is the problem...ssh-keygen doesn't like my private key. After making a new keypair (with ssh-keygen instead of PuTTY), everything seems to be working.

Thank you for all your help!
 
Old 12-13-2011, 03:24 PM   #5
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Just to elaborate: PuTTY has its own format of a private key. You can convert this format in puttygen itself into the openssh format (besides the commercial format). There is a menu entry for it.
 
Old 12-13-2011, 03:26 PM   #6
garyozzy
Member
 
Registered: Jun 2005
Distribution: RHEL, CentOS, Debian, Ubuntu, Arch
Posts: 181

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Reuti View Post
Just to elaborate: PuTTY has its own format of a private key. You can convert this format in puttygen itself into the openssh format (besides the commercial format). There is a menu entry for it.
I had done this (export OpenSSH key I think the option's called?) but I probably messed it up somehow moving everything around.
 
  


Reply



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
How to enable passphrase for access via ssh me_spearhead Linux - Security 6 05-19-2011 09:18 AM
SSH RSA passphrase in script ? jonaskellens Linux - Newbie 2 11-08-2010 10:34 AM
SSH no-password authentication: RSA Passphrase Nokao Linux - Server 8 12-28-2009 10:17 AM
SSH without a password or passphrase Chocolate Linux - Networking 4 03-04-2007 02:59 AM
ssh / ssh-key -- its always asking for passphrase BaerRS Linux - General 1 01-07-2003 06:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:25 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
Open Source Consulting | Domain Registration