View previous topic :: View next topic |
Author |
Message |
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Thu Apr 04, 2013 9:45 am Post subject: [solved] ssh login with a passphrase and not with a key |
|
|
/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 |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Thu Apr 04, 2013 9:56 am Post subject: |
|
|
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 |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Thu Apr 04, 2013 11:19 am Post subject: |
|
|
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 |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Thu Apr 04, 2013 11:19 am Post subject: |
|
|
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 |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Thu Apr 04, 2013 11:37 am Post subject: |
|
|
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 |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Thu Apr 04, 2013 3:10 pm Post subject: |
|
|
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 |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Thu Apr 04, 2013 3:58 pm Post subject: |
|
|
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 |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Thu Apr 04, 2013 4:03 pm Post subject: |
|
|
yep |
|
Back to top |
|
|
|