Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] ssh login with a passphrase and not with a key
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3701
Location: Hamburg

PostPosted: Thu Apr 04, 2013 9:45 am    Post subject: [solved] ssh login with a passphrase and not with a key Reply with quote

/me just wondering how I can disable the use of a SSH key and force the passphrase while ssh'ing to a particular remote host ?

Last edited by toralf on Thu Apr 04, 2013 4:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7106

PostPosted: Thu Apr 04, 2013 9:56 am    Post subject: Reply with quote

What a strange query toralf :)

ssh accept them thru its authorized_keys file, i suppose i would change the file owner to prevent ssh reading it to temp disable any user with a key to access it without password.
I don't know if ssh as any option for that.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Thu Apr 04, 2013 11:19 am    Post subject: Reply with quote

Create a ~/.ssh/config file with the following contents
Code:

Host <IP_Address or Hostname of remote>
    User <your user id in remote>
    PreferredAuthentications password

_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3701
Location: Hamburg

PostPosted: Thu Apr 04, 2013 11:19 am    Post subject: Reply with quote

The problem is the remote host - it seems, that there the .ssh/<files> are somehow damaged :
Code:
debug1: Connecting to [<snip>]port 22.
debug1: Connection established.
debug1: identity file /home/tfoerste/.ssh/identity type -1
debug3: Not a RSA1 key file /home/tfoerste/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
...
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/tfoerste/.ssh/id_rsa type 1
debug1: identity file /home/tfoerste/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
What I already tried is to remove my local .ssh directory away - but that doesn't helped - and the messages above are related to the remote files.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7106

PostPosted: Thu Apr 04, 2013 11:37 am    Post subject: Reply with quote

the id_rsa.pub (the public key part) looks like
Code:
ssh-rsa ...= id@host

and the id_rsa (the private key part)
Code:
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----


Your log shown the BEGIN and END, the user might have copied over the public key into the private key or your server offering the wrong key, i'm not quiet sure who is to blame. I would say the server close the connection, so the client is not doing the things right.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3701
Location: Hamburg

PostPosted: Thu Apr 04, 2013 3:10 pm    Post subject: Reply with quote

ppurka wrote:
Create a ~/.ssh/config file with the following contents
Code:

Host <IP_Address or Hostname of remote>
    User <your user id in remote>
    PreferredAuthentications password
good idea - doesn't work - seems that the remote sshd is configured to not accept pass phrase ?
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Thu Apr 04, 2013 3:58 pm    Post subject: Reply with quote

Yes. could be that the remote sshd does not accept password authentication. Since all the problems are from remote, your best option is to contact the remote admin.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3701
Location: Hamburg

PostPosted: Thu Apr 04, 2013 4:03 pm    Post subject: Reply with quote

yep
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum