I have sshd on the server, I ran it like this:
Code: Select all
/usr/sbin/sshd -d -p 2222
when I connect using sftp from my computer, which uses .ssh/id_rsa for authentication I get this on the client:
Code: Select all
~ $ sftp -P 2222 root@example.com
Connected to root@example.com.
sftp>
Code: Select all
~# /usr/sbin/sshd -d -p 2222
debug1: sshd version OpenSSH_7.6, OpenSSL 1.0.2n 7 Dec 2017
debug1: private host key #0: ...
debug1: private host key #1: ...
debug1: private host key #2: ...
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: rexec_argv[2]='-p'
debug1: rexec_argv[3]='2222'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 2222 on 0.0.0.0.
Server listening on 0.0.0.0 port 2222.
debug1: Bind to port 2222 on ::.
Server listening on :: port 2222.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
Connection from 154.177.235.93 port 55709 on ... port 2222
debug1: Client protocol version 2.0; client software version OpenSSH_8.1
debug1: match: OpenSSH_8.1 pat OpenSSH* compat 0x04000000
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.6
debug1: permanently_set_uid: 109/65534 [preauth]
debug1: list_hostkey_types: ... [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: algorithm: curve25519-sha256 [preauth]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256 [preauth]
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none [preauth]
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none [preauth]
debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
debug1: rekey after 134217728 blocks [preauth]
debug1: SSH2_MSG_NEWKEYS sent [preauth]
debug1: expecting SSH2_MSG_NEWKEYS [preauth]
debug1: SSH2_MSG_NEWKEYS received [preauth]
debug1: rekey after 134217728 blocks [preauth]
debug1: KEX done [preauth]
debug1: userauth-request for user root service ssh-connection method none [preauth]
debug1: attempt 0 failures 0 [preauth]
debug1: PAM: initializing for "root"
debug1: PAM: setting PAM_RHOST to "..."
debug1: PAM: setting PAM_TTY to "ssh"
debug1: userauth-request for user root service ssh-connection method publickey [preauth]
debug1: attempt 1 failures 0 [preauth]
debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA ... [preauth]
debug1: temporarily_use_uid: 0/0 (e=0/0)
debug1: trying public key file /root/.ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug1: matching key found: file /root/.ssh/authorized_keys, line 11 RSA ...
debug1: restore_uid: 0/0
Postponed publickey for root from ... port 55709 ssh2 [preauth]
debug1: userauth-request for user root service ssh-connection method publickey [preauth]
debug1: attempt 2 failures 0 [preauth]
debug1: temporarily_use_uid: 0/0 (e=0/0)
debug1: trying public key file /root/.ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug1: matching key found: file /root/.ssh/authorized_keys, line 11 RSA ...
debug1: restore_uid: 0/0
debug1: do_pam_account: called
Accepted publickey for root from ... port 55709 ssh2: RSA ...
debug1: monitor_child_preauth: root has been authenticated by privileged process
debug1: monitor_read_log: child log fd closed
debug1: PAM: establishing credentials
debug1: rekey after 134217728 blocks
debug1: rekey after 134217728 blocks
debug1: ssh_packet_set_postauth: called
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch
debug1: server_input_channel_open: ctype session rchan 0 win 2097152 max 32768
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_global_request: rtype no-more-sessions@openssh.com want_reply 0
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request subsystem reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req subsystem
debug1: subsystem: exec() /usr/lib/openssh/sftp-server
Starting session: subsystem 'sftp' for root from ... port 55709 id 0
Now I try to use filezilla:
filezilla logs:
Code: Select all
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 0
Status: Connecting to root@example.com:2222...
Trace: Going to execute /Applications/FileZilla.app/Contents/MacOS//fzsftp
Response: fzSftp started, protocol_version=11
Trace: CSftpConnectOpData::ParseResponse() in state 0
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 2
Command: keyfile "/Users/adam/.ssh/id_rsa"
Trace: CSftpConnectOpData::ParseResponse() in state 2
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 3
Command: open "root@example.com" 2222
Trace: Looking up host "example.com" for SSH connection
Trace: Connecting to ... port 2222
Trace: We claim version: SSH-2.0-FileZilla_3.59.0
Error: Connection timed out after 60 seconds of inactivity
Trace: CControlSocket::DoClose(2050)
Trace: CControlSocket::ResetOperation(2114)
Trace: CSftpConnectOpData::Reset(2114) in state 3
Error: Could not connect to server
Trace: CFileZillaEnginePrivate::ResetOperation(2114)
Status: Waiting to retry...
Trace: CControlSocket::DoClose(66)
Trace: CControlSocket::ResetOperation(66)
Trace: CFileZillaEnginePrivate::ResetOperation(66)
Trace: CControlSocket::DoClose(66)
Trace: CControlSocket::ResetOperation(66)
Trace: CFileZillaEnginePrivate::ResetOperation(66)
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 0
Status: Connecting to example.com:2222...
Trace: Going to execute /Applications/FileZilla.app/Contents/MacOS//fzsftp
Response: fzSftp started, protocol_version=11
Trace: CSftpConnectOpData::ParseResponse() in state 0
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 2
Command: keyfile "/Users/adam/.ssh/id_rsa"
Trace: CSftpConnectOpData::ParseResponse() in state 2
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 3
Command: open "root@example.com" 2222
Trace: Looking up host "root@example.com" for SSH connection
Trace: Connecting to ... port 2222
Trace: We claim version: SSH-2.0-FileZilla_3.59.0
Error: Connection timed out after 60 seconds of inactivity
Trace: CControlSocket::DoClose(2050)
Trace: CControlSocket::ResetOperation(2114)
Trace: CSftpConnectOpData::Reset(2114) in state 3
Error: Could not connect to server
Trace: CFileZillaEnginePrivate::ResetOperation(2114)
Code: Select all
~# /usr/sbin/sshd -d -p 2222
debug1: sshd version OpenSSH_7.6, OpenSSL 1.0.2n 7 Dec 2017
debug1: private host key #0: ssh-rsa ...
debug1: private host key #1: ecdsa-sha2-nistp256 ...
debug1: private host key #2: ssh-ed25519 ...
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: rexec_argv[2]='-p'
debug1: rexec_argv[3]='2222'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 2222 on 0.0.0.0.
Server listening on 0.0.0.0 port 2222.
debug1: Bind to port 2222 on ::.
Server listening on :: port 2222.
So what else can I do to debug the issue further?
Note: I changed nothing on the server, and it used to work just fine.
Note 2: I may or may not have had filezilla updated.
Thanks in advance for your help and support. Great program