scp stopped working after upgrade, ssh is fine

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
On Gentoo, I recently upgraded PAM and OpenSSH to versions pam-0.77 and
openssh-3.8.1_p1-r1.  My pam config for sshd accidentally got erased in
the process.  ssh works fine, but I cannot scp.  With scp -v I get the
following after entering the password:

debug1: ssh-userauth2 successful: method keyboard-interactive
debug1: fd 4 setting O_NONBLOCK
debug1: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug1: send channel open 0
debug1: Entering interactive session.
debug1: ssh_session2_setup: id 0
debug1: Sending command: scp -v -t /home/dpix
debug1: channel request 0: exec
debug1: channel 0: open confirm rwindow 0 rmax 32768
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: rcvd eof
debug1: channel 0: output open -> drain
debug1: channel 0: obuf empty
debug1: channel 0: close_write
debug1: channel 0: output drain -> closed
debug1: channel 0: rcvd close
debug1: channel 0: close_read
debug1: channel 0: input open -> closed
debug1: channel 0: almost dead
debug1: channel 0: gc: notify user
debug1: channel 0: gc: user detached
debug1: channel 0: send close
debug1: channel 0: is dead
debug1: channel 0: garbage collecting
debug1: channel_free: channel 0: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 255
lost connection

My auth log led me to believe it was a problem with pam.  When I use
'UsePAM no' in sshd_config, scp works fine.  Contents of
/var/log/auth.log and /etc/pam.d/sshd follows.


Aug  1 11:59:13 dpix sshd(pam_unix)[8182]: session opened for user dpix
by (uid=0)
Aug  1 11:59:13 dpix sshd[8182]: fatal: PAM: pam_open_session():
Permission denied


auth    required nullok
auth    required
auth    required
auth    required
account         required
password        required difok=3 retry=3 minlen=8
dcredit=2 ocredit=2 use_authtok
password        required shadow md5
session         required
session         requierd

What am I missing in my pam config file for sshd?  Or is it something else?

Thanks in advance,

Re: scp stopped working after upgrade, ssh is fine

Quoted text here. Click to load it
Quoted text here. Click to load it

Quoted text here. Click to load it

Typo in post or PAM config file?

Darren Tucker (dtucker at
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

Re: scp stopped working after upgrade, ssh is fine

Darren Tucker wrote:
Quoted text here. Click to load it

Nice catch, thank you kindly. :)


Site Timeline