我刚刚安装了 openssh-sftp-client - 7.6p1-1,但不知何故我无法通过 sftp 连接到任何服务器,尽管它显示已安装,而且显然是一个命令。我可以通过 SSH 连接,但无法通过 SFTP 连接
这里我展示了安装了 open-ssh-client 的软件包列表:
[/] # uname -v
opkg list-installed
entware-opt - 222108-5
findutils - 4.6.0-1
ldconfig - 2.23-6
libc - 2.23-6
libgcc - 6.3.0-6
libopenssl - 1.0.2n-1
libpthread - 2.23-6
librt - 2.23-6
libssp - 6.3.0-6
libstdcpp - 6.3.0-6
locales - 2.23-6
openssh-sftp-client - 7.6p1-1
opkg - 2011-04-08-9c97d5ec-17a
terminfo - 6.0-1c
zlib - 1.2.11-1
这里我展示了据我所知 SFTP 客户端实际上是可执行的:
[/] # sftp
usage: sftp [-46aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
[-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
[-o ssh_option] [-P port] [-R num_requests] [-S program]
[-s subsystem | sftp_server] host
sftp [user@]host[:file ...]
sftp [user@]host[:dir[/]]
sftp -b batchfile [user@]host
这里我展示了 SSH 与另一台服务器完美运行:
[/] # ssh [email protected]
The authenticity of host '10.1.1.2 (10.1.1.2)' can't be established.
ECDSA key fingerprint is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.1.1.2' (ECDSA) to the list of known hosts.
[email protected]'s password:
Linux XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
但是当我尝试运行 sftp 时,我看到了以下内容:
[/] # sftp [email protected]
exec: /opt/bin/ssh: No such file or directory
Connection closed
我是否必须编辑下面的 sshd_config 文件:
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
Subsystem sftp /share/MD0_DATA/.qpkg/Entware-ng/bin
AllowUsers admin
# Example of overriding settings on a per-user basis
#Match User anoncvs
任何帮助都将不胜感激。谢谢 Mike