【linux】linux个别用户sftp坏掉,验证密码后卡住, 大概是什么问题?

问题描述

linux个别用户sftp坏掉,验证密码后卡住, 大概是什么问题?

所有采用sftp的软件都不能用了

winsshfs 点击mount后就卡住
xftp 连接验证结束后也卡住
sublimeText3 的sftp插件也不好用了

突然发生的情况
之前一直用着都没有问题

一直正常使用 只是 在出现故障几天前安装了tmux(安装tmux后也正常使用了好多天)

本机执行sftp命令也不行

【linux】linux个别用户sftp坏掉,验证密码后卡住, 大概是什么问题?
到这里就卡住了

其他用户就可以

【linux】linux个别用户sftp坏掉,验证密码后卡住, 大概是什么问题?

-----------------------update--------------------------
成功与不成功的多了一些输出

debug2: Remote version: 3

debug2: Server supports extension "[email protected]" revision 1

debug2: Server supports extension "[email protected]" revision 2

debug2: Server supports extension "[email protected]" revision 2

Connected to [email protected]

debug3: Sent message fd 6 T:16 I:1

debug3: SSH_FXP_REALPATH . -> /data/home/tabris size 0

sftp>

这是成功的输出(仅复制了输入密码后面的

[email protected]'s password:

debug3: send packet: type 50

debug2: we sent a password packet, wait for reply

debug3: receive packet: type 52

debug1: Authentication succeeded (password).

Authenticated to 10.125.51.7 ([10.125.51.7]:36000).

debug2: fd 4 setting O_NONBLOCK

debug2: fd 5 setting O_NONBLOCK

debug1: channel 0: new [client-session]

debug3: ssh_session2_open: channel_new: 0

debug2: channel 0: send open

debug3: send packet: type 90

debug1: Requesting [email protected]

debug3: send packet: type 80

debug1: Entering interactive session.

debug1: pledge: network

debug3: receive packet: type 91

debug2: channel_input_open_confirmation: channel 0: callback start

debug2: fd 3 setting TCP_NODELAY

debug2: client_session2_setup: id 0

debug1: Sending subsystem: sftp

debug2: channel 0: request subsystem confirm 1

debug3: send packet: type 98

debug2: channel_input_open_confirmation: channel 0: callback done

debug2: channel 0: open confirm rwindow 0 rmax 32768

debug2: channel 0: rcvd adjust 2097152

debug3: receive packet: type 99

debug2: channel_input_status_confirm: type 99 id 0

debug2: subsystem request accepted on channel 0

debug2: Remote version: 3

debug2: Server supports extension "[email protected]" revision 1

debug2: Server supports extension "[email protected]" revision 2

debug2: Server supports extension "[email protected]" revision 2

Connected to [email protected]

debug3: Sent message fd 6 T:16 I:1

debug3: SSH_FXP_REALPATH . -> /data/home/tabris size 0

sftp>

这是不成功的输出(仅复制了输入密码后面的

[email protected]'s password:

debug3: send packet: type 50

debug2: we sent a password packet, wait for reply

debug3: receive packet: type 52

debug1: Authentication succeeded (password).

Authenticated to 10.125.51.7 ([10.125.51.7]:36000).

debug2: fd 4 setting O_NONBLOCK

debug2: fd 5 setting O_NONBLOCK

debug1: channel 0: new [client-session]

debug3: ssh_session2_open: channel_new: 0

debug2: channel 0: send open

debug3: send packet: type 90

debug1: Requesting [email protected]

debug3: send packet: type 80

debug1: Entering interactive session.

debug1: pledge: network

debug3: receive packet: type 91

debug2: channel_input_open_confirmation: channel 0: callback start

debug2: fd 3 setting TCP_NODELAY

debug2: client_session2_setup: id 0

debug1: Sending subsystem: sftp

debug2: channel 0: request subsystem confirm 1

debug3: send packet: type 98

debug2: channel_input_open_confirmation: channel 0: callback done

debug2: channel 0: open confirm rwindow 0 rmax 32768

debug2: channel 0: rcvd adjust 2097152

debug3: receive packet: type 99

debug2: channel_input_status_confirm: type 99 id 0

debug2: subsystem request accepted on channel 0

回答

加上-vvv参数, 把中间的输出结果打出来看看

sftp -vvv -oPort=36000 [email protected]

看上去登录验证都通过了,获取终端时卡住了, 不妨试试加 -t 参数

ssh -t -oPort=36000 [email protected] /bin/bash 

这样登录时用户可以跳过远端脚本如 /etc/profile 和 ~/.profile ~/.bashrc 等等。
很可能这些脚本有问题,导致用户无法进入系统。

以上是 【linux】linux个别用户sftp坏掉,验证密码后卡住, 大概是什么问题? 的全部内容, 来源链接: utcz.com/a/85357.html

回到顶部