I successfully installed Tomcat9 and jdk11 in arch, but I want to deploy remote tomcat with idea on the computer, so I need to use SFTP, I can login by ssh but can not login by sftp
1. sshd_config as follow
[root20:54~]$ cat /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
Port 9922
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no # pam does that
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# override default of no subsystems
Subsystem sftp /usr/lib/ssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
PermitRootLogin yes
2. start sshd sevice
[root20:53~]$ netstat -anp | grep sshd
tcp 0 0 0.0.0.0:8022 0.0.0.0:* LISTEN 9472/sshd
tcp 0 0 0.0.0.0:9922 0.0.0.0:* LISTEN 9205/sshd
tcp 0 0 192.168.2.116:8022 192.168.2.180:60587 ESTABLISHED 9513/sshd
tcp 0 0 192.168.2.116:9922 192.168.2.178:55951 ESTABLISHED 9207/sshd: root@pts
tcp 0 0 192.168.2.116:8022 192.168.2.180:54077 ESTABLISHED 9502/sshd
tcp 0 0 192.168.2.116:8022 192.168.2.180:61115 ESTABLISHED 9531/sshd
tcp6 0 0 :::8022 :::* LISTEN 9472/sshd
tcp6 0 0 :::9922 :::* LISTEN 9205/sshd
unix 2 [ ] STREAM CONNECTED 2408414 9207/sshd: root@pts
[root20:57~]$
3. try sftp login and ssh login
PS C:\Users\lili> ssh -p 9922 [email protected]
[email protected]'s password:
printf "\n\e[1;34mWelcome to Arch Linux in Termux!\nInstall a package: \e[0;34mpacman -S package\n\e[1;34mMore information: \e[0;34mpacman -[D|F|Q|R|S|T|U]h\n\e[1;34mSearch packages: \e[0;34mpacman -Ss query\n\e[1;34mUpgrade packages: \e[0;34mpacman -Syu\n\n\e[1;34mChat: \e[0mwiki.termux.com/wiki/Community\n\e[1;34mHelp: \e[0;34minfo query \e[1;34mand \e[0;34mman query\n\e[1;34mIRC: \e[0mwiki.archlinux.org/index.php/IRC_channel\n\n\e[0m"
Last login: Mon Feb 17 20:24:44 2020 from 192.168.2.180
Welcome to Arch Linux in Termux!
Install a package: pacman -S package
More information: pacman -[D|F|Q|R|S|T|U]h
Search packages: pacman -Ss query
Upgrade packages: pacman -Syu
Chat: wiki.termux.com/wiki/Community
Help: info query and man query
IRC: wiki.archlinux.org/index.php/IRC_channel
[root21:24~]$
sftp -P 9922 [email protected]
[email protected]'s password:
Connection closed
4.debug sftp login info : Exit code 255
ssh -vvv -P 9922 [email protected]
debug3: spawning "C:\\Windows\\System32\\OpenSSH\\ssh.exe" "-oForwardX11 no" "-oForwardAgent no" "-oPermitLocalCommand no" "-oClearAllForwardings yes" "-v" "-v" "-v" "-oPort 9922" "-oProtocol 2" "-s" "--" "[email protected]" "sftp"
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug3: Failed to open file:C:/Users/lili/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.2.116 is address
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.2.116 [192.168.2.116] port 9922.
debug1: Connection established.
debug1: identity file C:\\Users\\lili/.ssh/id_rsa type 0
debug3: Failed to open file:C:/Users/lili/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/lili/.ssh/id_rsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\lili/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:/Users/lili/.ssh/id_dsa error:2
debug3: Failed to open file:C:/Users/lili/.ssh/id_dsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\lili/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/lili/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:/Users/lili/.ssh/id_dsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\lili/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:/Users/lili/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:/Users/lili/.ssh/id_ecdsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\lili/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/lili/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:/Users/lili/.ssh/id_ecdsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\lili/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:/Users/lili/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:/Users/lili/.ssh/id_ed25519.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\lili/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/lili/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:/Users/lili/.ssh/id_ed25519-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\lili/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/lili/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/lili/.ssh/id_xmss.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\lili/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/lili/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/lili/.ssh/id_xmss-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\lili/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.1
debug1: match: OpenSSH_8.1 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.2.116:9922 as 'root'
debug3: put_host_port: [192.168.2.116]:9922
debug3: hostkeys_foreach: reading file "C:\\Users\\lili/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file C:\\Users\\lili/.ssh/known_hosts:14
debug3: load_hostkeys: loaded 1 keys from [192.168.2.116]:9922
debug3: Failed to open file:C:/Users/lili/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa,[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ssh-rsa SHA256:96mV1Tq0UhSO6V5KJAo/PdGGaW7RaQrb/aejrrfqles
debug3: put_host_port: [192.168.2.116]:9922
debug3: put_host_port: [192.168.2.116]:9922
debug3: hostkeys_foreach: reading file "C:\\Users\\lili/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file C:\\Users\\lili/.ssh/known_hosts:14
debug3: load_hostkeys: loaded 1 keys from [192.168.2.116]:9922
debug3: Failed to open file:C:/Users/lili/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug3: hostkeys_foreach: reading file "C:\\Users\\lili/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file C:\\Users\\lili/.ssh/known_hosts:14
debug3: load_hostkeys: loaded 1 keys from [192.168.2.116]:9922
debug3: Failed to open file:C:/Users/lili/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug1: Host '[192.168.2.116]:9922' is known and matches the RSA host key.
debug1: Found key in C:\\Users\\lili/.ssh/known_hosts:14
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug3: unable to connect to pipe \\\\.\\pipe\\openssh-ssh-agent, error: 2
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug2: key: C:\\Users\\lili/.ssh/id_rsa (000001C32C496FF0)
debug2: key: C:\\Users\\lili/.ssh/id_dsa (0000000000000000)
debug2: key: C:\\Users\\lili/.ssh/id_ecdsa (0000000000000000)
debug2: key: C:\\Users\\lili/.ssh/id_ed25519 (0000000000000000)
debug2: key: C:\\Users\\lili/.ssh/id_xmss (0000000000000000)
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:cRAQobWZ+frHcTy52Uu5g3pDflJ1ecx3x5HehrFsO+U C:\\Users\\lili/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\\Users\\lili/.ssh/id_dsa
debug3: no such identity: C:\\Users\\lili/.ssh/id_dsa: No such file or directory
debug1: Trying private key: C:\\Users\\lili/.ssh/id_ecdsa
debug3: no such identity: C:\\Users\\lili/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: C:\\Users\\lili/.ssh/id_ed25519
debug3: no such identity: C:\\Users\\lili/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: C:\\Users\\lili/.ssh/id_xmss
debug3: no such identity: C:\\Users\\lili/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
debug3: failed to open file:C:/dev/tty error:3
debug1: read_passphrase: can't open /dev/tty: No such file or directory
[email protected]'s password:
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (password).
Authenticated to 192.168.2.116 ([192.168.2.116]:9922).
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug1: Sending subsystem: sftp
debug2: channel 0: request subsystem confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: subsystem request accepted on channel 0
debug3: receive packet: type 96
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
debug2: channel 0: rcvd eow
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug3: receive packet: type 97
debug2: channel 0: rcvd close
debug3: channel 0: will not send data after close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug3: send packet: type 97
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)
debug3: send packet: type 1
debug3: fd 0 is not O_NONBLOCK
debug3: fd 1 is not O_NONBLOCK
Transferred: sent 2088, received 2836 bytes, in 0.2 seconds
Bytes per second: sent 9230.5, received 12537.2
debug1: Exit status 255
Connection closed
5. Other attempts
1. replace sftp-server
Termux can open SFTP server, I successfully logged in, I doubt whether it is the problem of sftp-server in arch, so I copied the sftp-server of Termux to the root directory of arch, and made a replacement, but only the wrong number became 127, so I think it is not the problem of sftp-server
2. add user sftp
- give the permisson 755 to ChrootDirectory,
- change sshd_configuration
- chang the sftp password
[root21:11~]$ tail -n 1 /etc/passwd
sftp:x:1001:1001::/home/sftp:/bin/bash
[root16:21~]$ ls -la /home/sftp
total 28
drwxr-xr-x 3 root root 4096 Feb 18 16:22 .
drwxr-xr-x 5 root root 4096 Feb 18 16:10 ..
-rw------- 1 root root 28 Feb 18 16:23 .bash_history
-rw-r--r-- 1 root root 21 Nov 19 11:09 .bash_logout
-rw-r--r-- 1 root root 57 Nov 19 11:09 .bash_profile
-rw-r--r-- 1 root root 141 Nov 19 11:09 .bashrc
drwxr-xr-x 2 root root 4096 Feb 16 19:38 upload
[root21:11~]$
/etc/ssh/sshd_config in arch
PermitRootLogin yes
Match user sftp
ChrootDirectory /home/sftp
ForceCommand internal-sftp
PasswordAuthentication yes
AllowTcpForwarding no
X11Forwarding no
restart sshd
[root21:11~]$ killall sshd
[root21:11~]$ /usr/sbin/sshd
[root16:26~]$ netstat -anp | grep 9922
tcp 0 0 0.0.0.0:9922 0.0.0.0:* LISTEN 28449/sshd: /usr/sb
tcp6 0 0 :::9922 :::* LISTEN 28449/sshd: /usr/sb
Try login but get the same error Exit code 255, connection closed
PS C:\Users\lili> sftp -P 9922 [email protected]
[email protected]'s password:
Connection closed
PS C:\Users\junli> sftp -vvv -P 9922 [email protected]
debug3: spawning "C:\\Windows\\System32\\OpenSSH\\ssh.exe" "-oForwardX11 no" "-oForwardAgent no" "-oPermitLocalCommand no" "-oClearAllForwardings yes" "-v" "-v" "-v" "-oPort 9922" "-oProtocol 2" "-s" "--" "[email protected]" "sftp"
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug3: Failed to open file:C:/Users/junli/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.2.116 is address
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.2.116 [192.168.2.116] port 9922.
debug1: Connection established.
debug1: identity file C:\\Users\\junli/.ssh/id_rsa type 0
debug3: Failed to open file:C:/Users/junli/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/junli/.ssh/id_rsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\junli/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:/Users/junli/.ssh/id_dsa error:2
debug3: Failed to open file:C:/Users/junli/.ssh/id_dsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\junli/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/junli/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:/Users/junli/.ssh/id_dsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\junli/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:/Users/junli/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:/Users/junli/.ssh/id_ecdsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\junli/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/junli/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:/Users/junli/.ssh/id_ecdsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\junli/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:/Users/junli/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:/Users/junli/.ssh/id_ed25519.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\junli/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/junli/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:/Users/junli/.ssh/id_ed25519-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\junli/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/junli/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/junli/.ssh/id_xmss.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\junli/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/junli/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/junli/.ssh/id_xmss-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\junli/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2
debug1: match: OpenSSH_8.2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.2.116:9922 as 'sftp'
debug3: put_host_port: [192.168.2.116]:9922
debug3: hostkeys_foreach: reading file "C:\\Users\\junli/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file C:\\Users\\junli/.ssh/known_hosts:6
debug3: load_hostkeys: loaded 1 keys from [192.168.2.116]:9922
debug3: Failed to open file:C:/Users/junli/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa,[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ssh-rsa SHA256:96mV1Tq0UhSO6V5KJAo/PdGGaW7RaQrb/aejrrfqles
debug3: put_host_port: [192.168.2.116]:9922
debug3: put_host_port: [192.168.2.116]:9922
debug3: hostkeys_foreach: reading file "C:\\Users\\junli/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file C:\\Users\\junli/.ssh/known_hosts:6
debug3: load_hostkeys: loaded 1 keys from [192.168.2.116]:9922
debug3: Failed to open file:C:/Users/junli/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug3: hostkeys_foreach: reading file "C:\\Users\\junli/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file C:\\Users\\junli/.ssh/known_hosts:6
debug3: load_hostkeys: loaded 1 keys from [192.168.2.116]:9922
debug3: Failed to open file:C:/Users/junli/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug1: Host '[192.168.2.116]:9922' is known and matches the RSA host key.
debug1: Found key in C:\\Users\\junli/.ssh/known_hosts:6
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug3: unable to connect to pipe \\\\.\\pipe\\openssh-ssh-agent, error: 2
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug2: key: C:\\Users\\junli/.ssh/id_rsa (0000016E1747FAF0)
debug2: key: C:\\Users\\junli/.ssh/id_dsa (0000000000000000)
debug2: key: C:\\Users\\junli/.ssh/id_ecdsa (0000000000000000)
debug2: key: C:\\Users\\junli/.ssh/id_ed25519 (0000000000000000)
debug2: key: C:\\Users\\junli/.ssh/id_xmss (0000000000000000)
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected]>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:E+xEuqjV7SDPyydXTBceKUi+oUi4EBWj9UySulmAgAo C:\\Users\\junli/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\\Users\\junli/.ssh/id_dsa
debug3: no such identity: C:\\Users\\junli/.ssh/id_dsa: No such file or directory
debug1: Trying private key: C:\\Users\\junli/.ssh/id_ecdsa
debug3: no such identity: C:\\Users\\junli/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: C:\\Users\\junli/.ssh/id_ed25519
debug3: no such identity: C:\\Users\\junli/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: C:\\Users\\junli/.ssh/id_xmss
debug3: no such identity: C:\\Users\\junli/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
debug3: failed to open file:C:/dev/tty error:3
debug1: read_passphrase: can't open /dev/tty: No such file or directory
[email protected]'s password:
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (password).
Authenticated to 192.168.2.116 ([192.168.2.116]:9922).
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug1: Sending subsystem: sftp
debug2: channel 0: request subsystem confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: subsystem request accepted on channel 0
debug3: receive packet: type 96
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
debug2: channel 0: rcvd eow
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug3: receive packet: type 97
debug2: channel 0: rcvd close
debug3: channel 0: will not send data after close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug3: send packet: type 97
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)
debug3: send packet: type 1
debug3: fd 0 is not O_NONBLOCK
debug3: fd 1 is not O_NONBLOCK
Transferred: sent 2088, received 2868 bytes, in 0.2 seconds
Bytes per second: sent 8568.0, received 11768.7
debug1: Exit status 255
Connection closed
6. In the end
I sincerely hope that the author can help me to solve this problem, otherwise I have no choice but to use Termux's own SFTP instead