SSHは機能しますが、SFTPは機能しません。

SSHは機能しますが、SFTPは機能しません。

私はホストコンピュータで複数のDockerコンテナを使用するクライアントプロジェクトを進めています。マイコンピュータからホストにいくつかのファイルをコピーする必要がありますが、SFTPクライアント(cyberduck)を使用するとサーバーに接続できません。

そのアドレスが複数ありますので@、接続できないのでしょうか?

SSH コマンドは次のとおりです。

ssh username@name@[email protected]

SFTPクライアントusername@name@identifierとサーバーにユーザー名を入力しようとしましたが、domain.comまだ接続できません。

可能ですか?ホストの端末を介してホストにSFTPを実行できることを確認できますか?

サーバーにSSH:ingするときにログイン

OpenSSH_7.7p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to domain.com port 22.
debug1: Connection established.
debug1: identity file /Users/user/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: Local version string SSH-2.0-OpenSSH_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.3
debug1: match: OpenSSH_7.3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to domain.com:22 as 'username@name@identifier'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-******
debug1: kex: server->client cipher: ****-poly***@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: *****-poly***@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ***********
debug1: Host 'domain.com' is known and matches the ECDSA host key.
debug1: Found key in /Users/user/.ssh/known_hosts:16
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:******* /Users/user/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /Users/user/.ssh/id_dsa
debug1: Trying private key: /Users/user/.ssh/id_ecdsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
username@name@[email protected]'s password:
debug1: Authentication succeeded (password).
Authenticated to domain.com ([12.345.678.9101]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending environment.
debug1: Sending env LC_CTYPE = UTF-8

This session is being recorded
Using username "other_username".
LEGAL NOTICE
------------
This is a PRIVATE computer system.
All unauthorized use or unauthorized access is prohibited
according to local laws and may lead to prosecution.

端末でSFTP:ingするときのロギング

Authenticated to Authenticated to domain.com ([12.345.678.9101]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending environment.
debug1: Sending env LC_CTYPE = UTF-8
debug1: Sending subsystem: sftp
subsystem request failed on channel 0
Connection closed

ベストアンサー1

以前のバージョンを修正する必要があり、/etc/ssh/sshd_config以下を追加してコンピュータを再起動しました。

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem   sftp    /usr/lib/openssh/sftp-server

おすすめ記事