You are not logged in.

#1 2010-10-15 22:08:37

Bushman
Member
Registered: 2010-05-27
Posts: 32

OpenSSH failure on local network

Having had Arch on my laptop for quite a while, I recently found the confidence within me to re-format my old (~2004) desktop for use as an SVN server. That seems to be working fine; however, SSH is not. I have created a key pair on my laptop for use with the server, but when I tried to upload it (using a password login) to the server with the ssh-copy-id script, it disconnected almost instantly (not even sure it connected in the first place) as follows:

scutter@electro:pts/1 ~ % ssh -l root -v arch-server
OpenSSH_5.5p1, OpenSSL 1.0.0a 1 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to arch-server [192.168.1.67] port 22.
debug1: Connection established.
debug1: could not open key file '/etc/ssh/ssh_host_key': Permission denied
debug1: could not open key file '/etc/ssh/ssh_host_dsa_key': Permission denied
debug1: could not open key file '/etc/ssh/ssh_host_rsa_key': Permission denied
debug1: identity file /home/archie/.ssh/id_rsa type 1
debug1: identity file /home/archie/.ssh/id_rsa-cert type -1
debug1: identity file /home/archie/.ssh/id_dsa type -1
debug1: identity file /home/archie/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.6
debug1: match: OpenSSH_5.6 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.5
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 'arch-server' is known and matches the RSA host key.
debug1: Found key in /home/archie/.ssh/known_hosts:4
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,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/archie/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /home/archie/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password: 
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
Write failed: Broken pipe

That "Write failed: Broken pipe" is occurred instantaneously after the previous line.

From another thread dating to May, someone said the problem was due to the connection timing out after connecting and using it for a little while. I, however, am not able to connect at all. When I `tail -f`-ed the server's auth.log, I picked up an error message that read something along the lines of "pam_setcred(): Permission denied". Until the keys get uploaded, I'm having to use plain-text PAM for authentication, which I can't open up my router to.

Offline

#2 2010-10-16 17:49:47

mir
Member
Registered: 2010-08-25
Posts: 59

Re: OpenSSH failure on local network

Hmm, I usually prefer "UsePAM no" in the sshd configuration, it simplifies things.

Routine questions:

- does root have a password?
- does root have a shell?
- what's in the server log?
- what's in the sshd configuration?

Offline

#3 2010-10-16 18:17:56

Bushman
Member
Registered: 2010-05-27
Posts: 32

Re: OpenSSH failure on local network

mir wrote:

Hmm, I usually prefer "UsePAM no" in the sshd configuration, it simplifies things.

Routine questions:

- does root have a password?
- does root have a shell?
- what's in the server log?
- what's in the sshd configuration?

- Yes, root has a password. I'm quite sure I remember it because I use it all the time for su.
- Yes, for su to work he would have had to have a shell. It's the standard bash shell.
- I don't have screen installed yet so I can't paste the log entries just yet.

Offline

#4 2010-10-16 18:35:53

mir
Member
Registered: 2010-08-25
Posts: 59

Re: OpenSSH failure on local network

Can you try with "UsePAM no"?

Offline

#5 2010-10-16 21:48:43

Bushman
Member
Registered: 2010-05-27
Posts: 32

Re: OpenSSH failure on local network

mir wrote:

Can you try with "UsePAM no"?

For some strange reason, that works even though I didn't have to set a separate password elsewhere (funny, I thought PAM was the standard authentication for regular user logins through agetty).

Offline

#6 2010-10-17 07:50:36

mir
Member
Registered: 2010-08-25
Posts: 59

Re: OpenSSH failure on local network

So, somehow PAM gets into the way. I cannot help you with the deeper reason, though, I always use sshd without PAM ...

Offline

Board footer

Powered by FluxBB