Ste*_*eve 5 ssh sftp scp winscp
我正在尝试使用 winSCP 连接到我们的远程服务器。之前是可以用的。但从今天开始我无法使用 SFTP 连接到服务器。如果我将协议更改为 SCP,那么我就可以连接。我也可以使用腻子进行连接。
以下是 winSCP 日志。(删除了主机详细信息)
. 2011-11-07 20:18:54.593 Using SFTP protocol.
. 2011-11-07 20:18:54.593 Doing startup conversation with host.
> 2011-11-07 20:18:54.593 Type: SSH_FXP_INIT, Size: 5, Number: -1
. 2011-11-07 20:18:54.593 Server sent command exit status 127
. 2011-11-07 20:18:54.593 Disconnected: All channels closed
* 2011-11-07 20:18:54.624 (ESshFatal) Connection has been unexpectedly closed. Server sent command exit status 127.
* 2011-11-07 20:18:54.624 Cannot initialize SFTP protocol. Is the host running a SFTP server?
. 2011-11-07 20:31:40.036 Looking up host <<host name>>
. 2011-11-07 20:31:40.052 Connecting to <<ip>> port 22
. 2011-11-07 20:31:40.630 Server version: SSH-2.0-OpenSSH_5.8
. 2011-11-07 20:31:40.630 We claim version: SSH-2.0-WinSCP_release_4.1.6
. 2011-11-07 20:31:40.630 SSPI: acquired credentials for: <<username>>
. 2011-11-07 20:31:40.630 Constructed service principal name 'host/<<hostname>>'
. 2011-11-07 20:31:40.802 GSSKEX disabled: The specified target is unknown or unreachable
. 2011-11-07 20:31:40.802 Using SSH protocol version 2
. 2011-11-07 20:31:40.927 Doing Diffie-Hellman group exchange
. 2011-11-07 20:31:41.224 Doing Diffie-Hellman key exchange with hash SHA-1
. 2011-11-07 20:31:41.787 Host key fingerprint is:
. 2011-11-07 20:31:41.787 ssh-rsa 2048 b9:2a:b8:56:a0:72:ff:10:11:d2:3e:55:95:5f:54:e2
. 2011-11-07 20:31:41.787 Initialised AES-256 SDCTR client->server encryption
. 2011-11-07 20:31:41.787 Initialised HMAC-SHA1 client->server MAC algorithm
. 2011-11-07 20:31:41.787 Initialised AES-256 SDCTR server->client encryption
. 2011-11-07 20:31:41.787 Initialised HMAC-SHA1 server->client MAC algorithm
! 2011-11-07 20:31:42.068 Using username <<username>>.
. 2011-11-07 20:31:42.677 Keyboard-interactive authentication refused
. 2011-11-07 20:31:42.677 Prompt (6, SSH password, , &Password: )
. 2011-11-07 20:31:46.568 Sent password
. 2011-11-07 20:31:46.865 Access granted
. 2011-11-07 20:31:47.162 Opened channel for session
. 2011-11-07 20:31:47.475 Started a shell/command
. 2011-11-07 20:31:47.475 Doing startup conversation with host.
> 2011-11-07 20:31:47.475 Type: SSH_FXP_INIT, Size: 5, Number: -1
. 2011-11-07 20:31:47.475 Server sent command exit status 127
. 2011-11-07 20:31:47.475 Disconnected: All channels closed
* 2011-11-07 20:31:47.506 (ESshFatal) Connection has been unexpectedly closed. Server sent command exit status 127.
* 2011-11-07 20:31:47.506 Cannot initialize SFTP protocol. Is the host running a SFTP server?
Run Code Online (Sandbox Code Playgroud)
最近发生的事情。
由于某种原因,我们的网站昨天无法访问。我们通知了我们的主机,他们重新启动了服务器。这个问题是在那之后才出现的。
我已经发出“locate sftp-server”,它返回两个位置。
/usr/libexec/openssh/sftp 服务器 /usr/local/libexec/sftp 服务器
看起来第二个文件夹(/usr/local/libexec/sftp-server)是前天创建/更新的。sshd-config 文件也在同一天更新。从 rpmpkgs 日志来看,vsftpd 似乎也在同一日期更新。
我怀疑发生了一些自动更新。我检查了 yum-updatesd.conf,但自动更新在那里被禁用。
如何让 sftp 服务器再次工作?在 sshd-config 中,子系统指向 /usr/libexec/openssh/sftp-server。我应该将其更改为 /usr/local/libexec/sftp-server 吗?
我可以从 putty 重新启动 sshd 吗?我也不想搞砸 ssh 连接。我想解决这个问题,而无需再次重新启动系统。
如果您需要更多信息,请告诉我。提前致谢