Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a problem with ssh key on freebsd vps. I generated a key and it works on debian. i usually just copy paste it to ~/.ssh/authorized_keys and it starting to work. In freebsd it doesn't. I tried to put it into ~/.ssh/authorized_keys2 still doesn't ring the bell.. My key has a passphase. so when I log in osx password windows popups to enter the password, after i push ok it says ident added to id_rsa, then ssh still asks for password in shell.

my laptop is osx lion. server which works is debian 6 squeeze server which doesn't work freebsd8.2

update:

ssh verbose output:

Romans-MacBook-Pro:~ holms$ ssh -v holms@xxx.nl
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug1: Connecting to xxx.nl [xx.xx.xx.xx] port 22.
debug1: Connection established.
debug1: identity file /Users/holms/.ssh/id_rsa type -1
debug1: identity file /Users/holms/.ssh/id_rsa-cert type -1
debug1: identity file /Users/holms/.ssh/id_dsa type -1
debug1: identity file /Users/holms/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.4p1 FreeBSD-20100308
debug1: match: OpenSSH_5.4p1 FreeBSD-20100308 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'roman.travelbird.nl' is known and matches the RSA host key.
debug1: Found key in /Users/holms/.ssh/known_hosts:3
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/holms/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /Users/holms/.ssh/id_rsa
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: read PEM private key done: type RSA
Identity added: /Users/holms/.ssh/id_rsa (/Users/holms/.ssh/id_rsa)
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /Users/holms/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentication succeeded (keyboard-interactive).
Authenticated to roman.travelbird.nl ([94.23.147.31]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Last login: Fri Jan 27 16:11:33 2012 from 46.145.76.30
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
    The Regents of the University of California.  All rights reserved.

FreeBSD 8.2-RELEASE (GENERIC) #0: Thu Feb 17 02:41:51 UTC 2011


 (                                     (    (    
 )\ )                                  )\ ) )\ ) 
(()/(         )       )        (   (  (()/((()/( 
 /(_)) (     (     ( /(   (    )\  )\  /(_))/(_))
(_))   )\    )\  ' )(_))  )\ )((_)((_)(_)) (_))  
| _ \ ((_) _((_)) ((_)_  _(_/(\ \ / / | _ \/ __| 
|   // _ \| '  \()/ _` || ' \))\ V /  |  _/\__ \ 
|_|_\\___/|_|_|_| \__,_||_||_|  \_/   |_|  |___/ 


$ 
share|improve this question
1  
try logging in with ssh and the -v switch (verbose) to get some more debugging information –  natxo asenjo Jan 27 '12 at 15:08
    
thnx for this , updated =) –  holms Jan 27 '12 at 15:14
    
you can add even more 'v's (like slogin -vvv user@host) to get even more debugging info :) –  natxo asenjo Jan 27 '12 at 15:21

1 Answer 1

up vote 0 down vote accepted

Problem solved:

it appears that when I copied public key, somehow break spaces was added after each whitespace. when I removed them everything works. thnx natxo_asenjo for tip

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.