web-dev-qa-db-ja.com

正しいパスワードの後に​​sftp接続が閉じられました

EC2/AWSでホストされているdebianのopenssh-serverを使用して、ポート10022でsftpサーバーを実行しています。 1人のユーザーに対してパスワードベースの認証を構成しましたが、正しいパスワードを送信した直後にサーバー接続が閉じられます。次に、sftpクライアントからの出力を示します。

steve@localhost's password: 
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
Authenticated to localhost ([127.0.0.1]:10022).
debug2: fd 4 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
Connection to localhost closed by remote Host.
Transferred: sent 1972, received 1644 bytes, in 0.0 seconds
Bytes per second: sent 1281358.2, received 1068231.7
debug1: Exit status -1
Couldn't read packet: Connection reset by peer

私はサーバーをDockerコンテナー内で実行していますが、本当に奇妙なのは、DockerコンテナーをMacでローカルに実行すると問題なく接続できることですが、AWSサーバーで実行すると上記の問題が発生します。上記の出力は、AWSサーバーでsftpクライアントを実行して(localhostへの接続を試行して)作成されたため、これはAWSへのネットワークアクセスとは関係ないと思います

3
codebox

LogLevel VERBOSE/etc/ssh/sshd_configに設定してからsshdを再起動し、/var/log/auth.logを確認して詳細を取得します。

3
Fabian