可能的SSH PAM PTY分配问题
可能的SSH PAM PTY分配问题,ssh,pam,pty,Ssh,Pam,Pty,我在AmazonEC2上有一个linux ubuntu服务器。在系统上创建了大约3000多名linux用户,用户ID为user_1、user_2等等
令人惊讶的是,直到用户_2685都可以通过ssh登录到服务器。除此之外没有
我已将/etc/ssh/sshd_config中的LogLevel更改为DEBUG3。粘贴相关内容
用户未能登录时的相关转储-
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18879]:调试1:分配pty。
4月18日10:18:00
我在AmazonEC2上有一个linux ubuntu服务器。在系统上创建了大约3000多名linux用户,用户ID为user_1、user_2等等
令人惊讶的是,直到用户_2685都可以通过ssh登录到服务器。除此之外没有
我已将/etc/ssh/sshd_config中的LogLevel更改为DEBUG3。粘贴相关内容
用户未能登录时的相关转储-
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18879]:调试1:分配pty。
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18879]:调试3:mm\U请求\U发送输入:类型26
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18879]:调试3:mm\u pty\u分配:等待监视器\u pty
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18879]:调试3:mm\U请求\U接收\U预期输入:类型27
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18879]:调试3:mm_请求_接收输入
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18802]:调试3:mm_请求_接收输入
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18802]:调试3:监视器读取:检查请求26
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18802]:调试3:mm_答案_pty entry
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18802]:调试2:会话\u新:分配(分配0最多10个)
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18802]:调试3:会话未使用:会话id 0未使用
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18802]:调试1:会话\u新建:会话0
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18802]:调试1:SELinux支持已禁用
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18879]:调试1:进行清理
4月18日10:18:00 domU-12-31-39-01-86-0C sshd[18879]:调试3:PAM:sshpam_线程
用户成功登录时的相关转储-
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试1:分配pty。
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试3:mm_请求_发送输入:类型26
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试3:mm\u pty\u分配:等待监视器\u pty
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试3:mm\U请求\U接收\U期望输入:类型27
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试3:mm_请求_接收输入
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18880]:调试3:mm_请求_接收输入
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18880]:调试3:监视器读取:检查请求26
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18880]:调试3:mm_答案_pty entry
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18880]:调试2:会话\u新:分配(分配0最多10个)
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18880]:调试3:会话未使用:会话id 0未使用
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18880]:调试1:会话\u新建:会话0
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18880]:调试1:SELinux支持已禁用
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18880]:调试3:mm\U请求\U发送输入:类型27
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18880]:调试3:mm_答案\u pty:tty/dev/pts/37 ptyfd 4
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试1:会话请求:会话0 alloc/dev/pts/37
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试1:忽略不支持的tty模式操作码11(0xb)
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试1:忽略不支持的tty模式操作码17(0x11)
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试1:服务器输入通道请求通道0请求外壳回复1
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试1:会话由会话频道进行:会话0频道0
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试1:会话输入信道请求:会话0请求外壳
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试2:fd 3设置TCP_节点延迟
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试2:通道0:rfd 9 isatty
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试2:fd 9设置O_非块
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18957]:调试3:fd 7为O_非块
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18958]:调试1:使用TIOCSCTTY设置控制tty。
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18958]:debug3:复制环境:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/games
4月18日10:20:07 domU-12-31-39-01-86-0C sshd[18958]:调试3:复制环境:LANG=en_US.UTF-8
4月18日10:20:07 domU-12-31-39-01-86-0C jk_chrootsh[18958]:现在进入监狱/opt/users rails应用程序,用于用户_1(1001)和参数
更新1:
以上转储来自服务器上的/var/log/auth.log。下面是客户端上的转储。只是将转储的相关部分放在
成功登录
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cc -1)
Connection to www.codelearn.org closed by remote host.
Connection to www.codelearn.org closed.
Transferred: sent 2488, received 1472 bytes, in 0.8 seconds
Bytes per second: sent 3043.4, received 1800.6
debug1: Exit status -1
调试2:通道0:请求外壳程序确认1
debug2:回调完成
调试2:通道0:打开确认rwindow 0 rmax 32768
调试2:通道输入状态确认:类型99 id 0
debug2:通道0上已接受PTY分配请求
调试2:通道0:rcvd调整2097152
调试2:通道输入状态确认:类型99 id 0
debug2:通道0上已接受外壳程序请求
登录失败
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cc -1)
Connection to www.codelearn.org closed by remote host.
Connection to www.codelearn.org closed.
Transferred: sent 2488, received 1472 bytes, in 0.8 seconds
Bytes per second: sent 3043.4, received 1800.6
debug1: Exit status -1
调试2:通道0:请求外壳程序确认1
debug2:回调完成
调试2:通道0:打开确认rwindow 0 rmax 32768
调试1:通道0:空闲:客户端会话,nchannels 1
调试3:通道0:状态:以下连接已打开:
#0客户端会话(t4 r0 i0/0 o0/0 fd 4/5 cc-1)
远程主机关闭了与www.codelearn.org的连接。
与www.codelearn.org的连接已关闭。
已传输:在0.8秒内发送2488个字节,接收1472个字节
每秒字节数:发送3043.4,接收1800.6
debug1:退出状态-1
操作系统:UbuntuPrecision12.04
Openssh服务器:Openssh_5.9p1 Debian-5ubuntu1.1,OpenSSL 1.0.1 2012年3月14日
SSH-client:这和我在ubuntu和Mac上试过的没有关系&行为是一样的
更新2:
顺便说一句-这不是PAM的问题,就像我可以做的那样su user\u 3000
&新用户登录并获得PTY
也在做ss