Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't connect SSH server to pc

76 views
Skip to first unread message

Fokke Nauta

unread,
Feb 4, 2024, 8:02:19 AM2/4/24
to
Hi all,

We have two smartphones, a Samsung S10 and a Samsung A53. On both phones
I installed a SSH server. ón my pc (Windows 10 Pro) I have an FTP
client, CuteFTP 9.3. With this client I can make a connection with the
A53 phone, after starting up the SSH server. Very easy!
However, with the S10 phone it won't work. The same SSH server, a
different user name and password. If I try to make a connection, there
is an error. This shows up in the client on the pc:

STATUS:> [04/02/2024 13:45:21] Getting listing ""...
STATUS:> [04/02/2024 13:45:21] Connecting to SFTP server...
192.168.1.160:2222 (ip = 192.168.1.160)...
ERROR:> [04/02/2024 13:45:22] Disconnect: key exchange failed.
ERROR:> [04/02/2024 13:45:22] Check security settings; make sure that
the username and password are correct, and that the chosen encryption
algorithms are supported by server.
STATUS:> [04/02/2024 13:45:22] Can't connect to 192.168.1.160:2222.
STATUS:> [04/02/2024 13:45:22] SFTP connection closed.

The user name and password is OK, no problem there. The chosen
encryption algorithms are the same on both phones, as the configuration
of the SSH servers on the phone is the same, apart from the user names
and passwords. But they are correct.

What may be wrong?

Many thanks in advance for your help.

With regards,
Fokke Nauta

Arno Welzel

unread,
Feb 5, 2024, 4:39:41 AM2/5/24
to
Fokke Nauta, 2024-02-04 14:02:

[...]
> The user name and password is OK, no problem there. The chosen
> encryption algorithms are the same on both phones, as the configuration
> of the SSH servers on the phone is the same, apart from the user names
> and passwords. But they are correct.
>
> What may be wrong?

Just to be sure that it's not a issue with the client, try FileZilla:

<https://filezilla-project.org/>


--
Arno Welzel
https://arnowelzel.de

Theo

unread,
Feb 5, 2024, 5:52:01 AM2/5/24
to
Something is failing in the negotiation when you connect, but not enough
info to be clear what it is.

Open a Windows command prompt or Powershell and type:

ssh -vvv -p 2222 phone_u...@192.168.1.160

(assuming that is the IP of the phone, replacing phone_username with the
username you configured on the phone)

and post the log here.


As a wild guess it's possible the SSH server is configured to use SSH keys
rather than password authentication, but I'm not familiar with the way
CuteFTP logs things to be sure.

Theo

Fokke Nauta

unread,
Feb 5, 2024, 5:53:04 AM2/5/24
to
Thanks. I downloaded and installed it, but it didn't connect. It gave an
error message.
So - it's not the client.

Fokke

Fokke Nauta

unread,
Feb 5, 2024, 6:11:09 AM2/5/24
to
Thanks.

I opened the command prompt and saw a long log text, but I didn't manage
yet to get it into a text file.
I used ssh -vvv -p 2222 sl...@192.168.1.160 > A:\msg.txt
There is a file called msg.txt but it is empty.
Perhaps I should use Powershell?

Fokke

Fokke Nauta

unread,
Feb 5, 2024, 6:39:29 AM2/5/24
to
With powershell I get a very short text, but again I can not save it
into a file.

Fokke

Chris Green

unread,
Feb 5, 2024, 9:03:06 AM2/5/24
to
Fokke Nauta <use...@solfon.nl> wrote:
>
> I opened the command prompt and saw a long log text, but I didn't manage
> yet to get it into a text file.
> I used ssh -vvv -p 2222 sl...@192.168.1.160 > A:\msg.txt
> There is a file called msg.txt but it is empty.
> Perhaps I should use Powershell?
>
You probably need something like:-
ssh -vvv -p 2222 sl...@192.168.1.160 >A:\msg.txt 2>&1

The '2>&1' redirects stderr to stdout (which is already going to msg.txt)

--
Chris Green
·

Arno Welzel

unread,
Feb 5, 2024, 10:20:15 AM2/5/24
to
Fokke Nauta, 2024-02-05 12:11:

[...]
> I opened the command prompt and saw a long log text, but I didn't manage
> yet to get it into a text file.
> I used ssh -vvv -p 2222 sl...@192.168.1.160 > A:\msg.txt
> There is a file called msg.txt but it is empty.
> Perhaps I should use Powershell?

You should also be able to select the text in the command prompt windows
and copy it without redirecting the output of ssh to a file.

Fokke Nauta

unread,
Feb 5, 2024, 11:50:46 AM2/5/24
to
OK, but how do I select the text in the command prompt window?

Fokke

Andy Burns

unread,
Feb 5, 2024, 11:56:19 AM2/5/24
to
Fokke Nauta wrote:

> how do I select the text in the command prompt window?

Drag a rectangular area with the mouse to select, press enter to copy

Fokke Nauta

unread,
Feb 5, 2024, 1:22:11 PM2/5/24
to
Thanks. I'll do this.

Fokke

Carlos E.R.

unread,
Feb 5, 2024, 2:26:57 PM2/5/24
to
Do you have a formatted floppy in the drive?

--
Cheers, Carlos.

Fokke Nauta

unread,
Feb 5, 2024, 3:16:56 PM2/5/24
to
Floppy? Floppy drive?
We don't have this for many years!

Fokke

Andy Burns

unread,
Feb 5, 2024, 3:23:09 PM2/5/24
to
Fokke Nauta wrote:

> Carlos E.R. wrote:
>
>> Do you have a formatted floppy in the drive?
>
> Floppy? Floppy drive?
> We don't have this for many years!

traditionally A: was a floppy drive ...

Carlos E.R.

unread,
Feb 5, 2024, 3:57:09 PM2/5/24
to
Then why do you tell the shell to dump the text to a floppy? It is
clearly there:

... > A:\msg.txt

--
Cheers, Carlos.

Fokke Nauta

unread,
Feb 6, 2024, 2:58:20 AM2/6/24
to
Yes, you are right. On my PC A: is a virtual drive.

Fokke

Fokke Nauta

unread,
Feb 6, 2024, 2:59:35 AM2/6/24
to
Well, on my pc A: is a virtual drive. I use it for temporary things.

Fokke

Fokke Nauta

unread,
Feb 7, 2024, 4:31:26 AM2/7/24
to
I tried this in the command prompt. It asked for the password, which I
entered. And indeed, this worked. Thanks. I will copy the content here.

OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.1.160 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.1.160 [192.168.1.160] port 2222.
debug1: Connection established.
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_rsa error:2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_rsa.pub error:2
debug1: identity file C:\\Users\\Fokke Nauta/.ssh/id_rsa type -1
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_rsa-cert.pub
error:2
debug1: identity file C:\\Users\\Fokke Nauta/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_dsa error:2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_dsa.pub error:2
debug1: identity file C:\\Users\\Fokke Nauta/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_dsa-cert.pub
error:2
debug1: identity file C:\\Users\\Fokke Nauta/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_ecdsa.pub error:2
debug1: identity file C:\\Users\\Fokke Nauta/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_ecdsa-cert.pub
error:2
debug1: identity file C:\\Users\\Fokke Nauta/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_ed25519.pub error:2
debug1: identity file C:\\Users\\Fokke Nauta/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_ed25519-cert
error:2
debug3: Failed to open file:C:/Users/Fokke
Nauta/.ssh/id_ed25519-cert.pub error:2
debug1: identity file C:\\Users\\Fokke Nauta/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_xmss.pub error:2
debug1: identity file C:\\Users\\Fokke Nauta/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_xmss-cert.pub
error:2
debug1: identity file C:\\Users\\Fokke Nauta/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug1: Remote protocol version 2.0, remote software version SSH Server
- Banana Studio
debug1: no match: SSH Server - Banana Studio
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.1.160:2222 as 'slauf'
debug3: put_host_port: [192.168.1.160]:2222
debug3: hostkeys_foreach: reading file "C:\\Users\\Fokke
Nauta/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\\Users\\Fokke
Nauta/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from [192.168.1.160]:2222
debug3: Failed to open file:C:/Users/Fokke Nauta/.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:
ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
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,curve255...@libssh.org,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,ext-info-c
debug2: host key algorithms:
ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed2551...@openssh.com,rsa-sha2-5...@openssh.com,rsa-sha2-2...@openssh.com,ssh-rsa-...@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos:
chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com
debug2: ciphers stoc:
chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com
debug2: MACs ctos:
umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc:
umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zl...@openssh.com,zlib
debug2: compression stoc: none,zl...@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms:
diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1
debug2: host key algorithms: ecdsa-sha2-nistp256
debug2: ciphers ctos:
aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,aes128-cbc,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc
debug2: ciphers stoc:
aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,aes128-cbc,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc
debug2: MACs ctos:
hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5,hmac-sha1-96,hmac-md5-96
debug2: MACs stoc:
hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5,hmac-sha1-96,hmac-md5-96
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256
compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256
compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256
SHA256:JD2yGa1+aF6yPMMZpeFGBkMHM5qLhfBo5mRERuyOOT4
debug3: put_host_port: [192.168.1.160]:2222
debug3: put_host_port: [192.168.1.160]:2222
debug3: hostkeys_foreach: reading file "C:\\Users\\Fokke
Nauta/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\\Users\\Fokke
Nauta/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from [192.168.1.160]:2222
debug3: Failed to open file:C:/Users/Fokke Nauta/.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\\Fokke
Nauta/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\\Users\\Fokke
Nauta/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from [192.168.1.160]:2222
debug3: Failed to open file:C:/Users/Fokke Nauta/.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.1.160]:2222' is known and matches the ECDSA host key.
debug1: Found key in C:\\Users\\Fokke Nauta/.ssh/known_hosts:1
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 4294967296 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 in after 4294967296 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
debug1: Will attempt key: C:\\Users\\Fokke Nauta/.ssh/id_rsa
debug1: Will attempt key: C:\\Users\\Fokke Nauta/.ssh/id_dsa
debug1: Will attempt key: C:\\Users\\Fokke Nauta/.ssh/id_ecdsa
debug1: Will attempt key: C:\\Users\\Fokke Nauta/.ssh/id_ed25519
debug1: Will attempt key: C:\\Users\\Fokke Nauta/.ssh/id_xmss
debug2: pubkey_prepare: done
debug3: send packet: type 5
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:
password,keyboard-interactive,publickey
debug3: start over, passed a different list
password,keyboard-interactive,publickey
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: Trying private key: C:\\Users\\Fokke Nauta/.ssh/id_rsa
debug3: no such identity: C:\\Users\\Fokke Nauta/.ssh/id_rsa: No such
file or directory
debug1: Trying private key: C:\\Users\\Fokke Nauta/.ssh/id_dsa
debug3: no such identity: C:\\Users\\Fokke Nauta/.ssh/id_dsa: No such
file or directory
debug1: Trying private key: C:\\Users\\Fokke Nauta/.ssh/id_ecdsa
debug3: no such identity: C:\\Users\\Fokke Nauta/.ssh/id_ecdsa: No such
file or directory
debug1: Trying private key: C:\\Users\\Fokke Nauta/.ssh/id_ed25519
debug3: no such identity: C:\\Users\\Fokke Nauta/.ssh/id_ed25519: No
such file or directory
debug1: Trying private key: C:\\Users\\Fokke Nauta/.ssh/id_xmss
debug3: no such identity: C:\\Users\\Fokke Nauta/.ssh/id_xmss: No such
file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 60
debug2: input_userauth_info_req
Password authentication
debug2: input_userauth_info_req: num_prompts 1
debug3: failed to open file:C:/dev/tty error:3
debug1: read_passphrase: can't open /dev/tty: No such file or directory
debug3: send packet: type 61
debug3: receive packet: type 52
debug1: Authentication succeeded (keyboard-interactive).
Authenticated to 192.168.1.160 ([192.168.1.160]:2222).
debug2: fd 5 setting O_NONBLOCK
debug2: fd 6 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: Entering interactive session.
debug1: pledge: network
debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the
VTSequence from console
debug3: This windows OS supports conpty
debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console
supports the ansi parsing
debug3: Successfully set console output code page from:65001 to 65001
debug3: Successfully set console input code page from:850 to 65001
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
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 2097152 rmax 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
:/ $


There are errors, but I don't know how this works.

Fokke

Fokke Nauta

unread,
Feb 7, 2024, 4:34:15 AM2/7/24
to
On 05/02/2024 16:20, Arno Welzel wrote:
Thanks. That worked! The result:

[C:\Program Files\JPSoft\TCCLE14x64] ssh -vvv -p 2222 sl...@192.168.1.160
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.1.160 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.1.160 [192.168.1.160] port 2222.
debug3: finish_connect - ERROR: async io completed with error: 10060,
io:000002AAF3CBF930
debug1: connect to address 192.168.1.160 port 2222: Connection timed out
ssh: connect to host 192.168.1.160 port 2222: Connection timed out

Fokke

Andy Burns

unread,
Feb 7, 2024, 4:46:59 AM2/7/24
to
Fokke Nauta wrote:

> OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
> debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/config error:2
> debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
> debug2: resolve_canonicalize: hostname 192.168.1.160 is address
> debug2: ssh_connect_direct
> debug1: Connecting to 192.168.1.160 [192.168.1.160] port 2222.
> debug1: Connection established.
> debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/id_rsa error:2
[snip]
> debug2: PTY allocation request accepted on channel 0
> debug3: receive packet: type 99
> debug2: channel_input_status_confirm: type 99 id 0
> debug2: shell request accepted on channel 0
> :/ $
>
> There are errors, but I don't know how this works.

The errors I see are just from it looking for optional files which don't
exist in your case, but it looks like it actually succeeded and you
arrive at a $ prompt

What happens when you type shell commands after that?


Andy Burns

unread,
Feb 7, 2024, 4:48:54 AM2/7/24
to
Fokke Nauta wrote:

> [C:\Program Files\JPSoft\TCCLE14x64] ssh -vvv -p 2222 sl...@192.168.1.160
> OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
> debug3: Failed to open file:C:/Users/Fokke Nauta/.ssh/config error:2
> debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
> debug2: resolve_canonicalize: hostname 192.168.1.160 is address
> debug2: ssh_connect_direct
> debug1: Connecting to 192.168.1.160 [192.168.1.160] port 2222.
> debug3: finish_connect - ERROR: async io completed with error: 10060,
> io:000002AAF3CBF930
> debug1: connect to address 192.168.1.160 port 2222: Connection timed out
> ssh: connect to host 192.168.1.160 port 2222: Connection timed out

Is this to the "other" phone?

can you open s terminal window in that phone itself (i.e. not across the
network)

Is one phone rooted and the other is not?



Theo

unread,
Feb 7, 2024, 4:53:38 AM2/7/24
to
Fokke Nauta <use...@solfon.nl> wrote:
> On 05/02/2024 15:02, Chris Green wrote:
> > Fokke Nauta <use...@solfon.nl> wrote:
> >>
> >> I opened the command prompt and saw a long log text, but I didn't manage
> >> yet to get it into a text file.
> >> I used ssh -vvv -p 2222 sl...@192.168.1.160 > A:\msg.txt
> >> There is a file called msg.txt but it is empty.
> >> Perhaps I should use Powershell?
> >>
> > You probably need something like:-
> > ssh -vvv -p 2222 sl...@192.168.1.160 >A:\msg.txt 2>&1
> >
> > The '2>&1' redirects stderr to stdout (which is already going to msg.txt)
> >
>
> I tried this in the command prompt. It asked for the password, which I
> entered. And indeed, this worked. Thanks. I will copy the content here.
>
> OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
> debug1: Connecting to 192.168.1.160 [192.168.1.160] port 2222.
> debug1: Connection established.
> debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
> debug1: Remote protocol version 2.0, remote software version SSH Server
> - Banana Studio

> debug3: order_hostkeyalgs: prefer hostkeyalgs:
> ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> debug2: KEX algorithms:
> curve25519-sha256,curve255...@libssh.org,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,ext-info-c
> debug2: host key algorithms:
> ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed2551...@openssh.com,rsa-sha2-5...@openssh.com,rsa-sha2-2...@openssh.com,ssh-rsa-...@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
> debug2: ciphers ctos:
> chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com
> debug2: ciphers stoc:
> chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com
> debug2: MACs ctos:
> umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> debug2: MACs stoc:
> umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> debug2: compression ctos: none,zl...@openssh.com,zlib
> debug2: compression stoc: none,zl...@openssh.com,zlib

> debug2: peer server KEXINIT proposal
> debug2: KEX algorithms:
> diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1
> debug2: host key algorithms: ecdsa-sha2-nistp256
> debug2: ciphers ctos:
> aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,aes128-cbc,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc
> debug2: ciphers stoc:
> aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,aes128-cbc,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc
> debug2: MACs ctos:
> hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5,hmac-sha1-96,hmac-md5-96
> debug2: MACs stoc:
> hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5,hmac-sha1-96,hmac-md5-96

> debug2: reserved 0
> debug1: kex: algorithm: ecdh-sha2-nistp256
> debug1: kex: host key algorithm: ecdsa-sha2-nistp256
> debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256
> compression: none
> debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256
> compression: none
> debug1: Authentications that can continue:
> password,keyboard-interactive,publickey
> debug3: start over, passed a different list
> password,keyboard-interactive,publickey
> debug3: preferred publickey,keyboard-interactive,password
> debug3: authmethod_lookup publickey
> debug3: remaining preferred: keyboard-interactive,password
> Password authentication
> debug1: Authentication succeeded (keyboard-interactive).
> Authenticated to 192.168.1.160 ([192.168.1.160]:2222).
> :/ $
>
>
> There are errors, but I don't know how this works.

SSH is negotiating various options - you would never have every possibility
set up but it looks to find something the client and server can agree on.

I trimmed the list above which shows you successfully got in. As to why
CuteFTP doesn't work we don't know in the absence of a similar log, but a
stab in the dark might be the limited range of KEX (key exchange), host key
algorithms, ciphers and HMACs. In the second block the client says which
algorithms it supports, then the third block the server says what it can do,
and in the fourth block they settle on a subset that both can do. In this
case the list from the server looks a bit limited, and I wonder if CuteFTP
also supports a limited and non-overlapping list. If that happens they
couldn't agree on a subset and the connection would fail.

You could try and see if the CuteFTP config has any options to enable
ciphers/KEX/host key algs/HMACs and tick them all. Failing that, maybe
there's an option in CuteFTP to give a more detailed log of what it's trying
to do and possible to spot what's going wrong.

Theo

Fokke Nauta

unread,
Feb 7, 2024, 7:31:46 AM2/7/24
to
Which commands should I use? In the command prompt?

Fokke

Fokke Nauta

unread,
Feb 7, 2024, 7:34:07 AM2/7/24
to
Thanks.
I'm happy to read that I got in.
I will have a look at CuteFTP.

Fokke

Fokke Nauta

unread,
Feb 7, 2024, 7:39:12 AM2/7/24
to
No, this is the same phone, the S10. None of the phones are rooted.

Fokke

Fokke Nauta

unread,
Feb 7, 2024, 7:44:08 AM2/7/24
to
The difference is, that in this case I selected the text in the command
prompt and copied it. I used ssh -vvv -p 2222 sl...@192.168.1.160.
The long log file I created with ssh -vvv -p 2222 sl...@192.168.1.160
>A:\msg.txt 2>&1.

Fokke


Theo

unread,
Feb 7, 2024, 7:58:52 AM2/7/24
to
Maybe your phone changed IP and isn't 192.168.1.160 any more?

Andy Burns

unread,
Feb 7, 2024, 7:59:25 AM2/7/24
to
Fokke Nauta wrote:

> Which commands should I use? In the command prompt?

pwd

ls

would be good to start with



Fokke Nauta

unread,
Feb 7, 2024, 10:16:55 AM2/7/24
to
Tried it in the command prompt:

[C:\Program Files\JPSoft\TCCLE14x64]pwd
TCC: Unknown command "pwd"

[C:\Program Files\JPSoft\TCCLE14x64]ls
TCC: Unknown command "ls"

Fokke Nauta

Fokke Nauta

unread,
Feb 7, 2024, 10:18:27 AM2/7/24
to
No, all devices get a fixed IP adress from the router, epending on their
MAC addresses.

Fokke

Andy Burns

unread,
Feb 7, 2024, 10:24:06 AM2/7/24
to
Fokke Nauta wrote:

> Tried it in the command prompt:
>
> [C:\Program Files\JPSoft\TCCLE14x64]pwd
> TCC: Unknown command "pwd"
>
> [C:\Program Files\JPSoft\TCCLE14x64]ls
> TCC: Unknown command "ls"

When you use your ssh command, do you end-up at a dollar prompt

debug2: shell request accepted on channel 0
:/ $

or is that some sort of slanted smiley that you typed?

Fokke Nauta

unread,
Feb 7, 2024, 10:50:06 AM2/7/24
to
This is how I used the ssh command:

ssh -vvv -p 2222 sl...@192.168.1.160 >A:\msg.txt 2>&1

What is a slanted smiley?

Fokke

Fokke Nauta

unread,
Feb 7, 2024, 10:55:35 AM2/7/24
to
On 04/02/2024 14:02, Fokke Nauta wrote:
> Hi all,
>
> We have two smartphones, a Samsung S10 and a Samsung A53. On both phones
> I installed a SSH server. ón my pc (Windows 10 Pro) I have an FTP
> client, CuteFTP 9.3. With this client I can make a connection with the
> A53 phone, after starting up the SSH server. Very easy!
> However, with the S10 phone it won't work. The same SSH server, a
> different user name and password. If I try to make a connection, there
> is an error. This shows up in the client on the pc:
>
> STATUS:>      [04/02/2024 13:45:21] Getting listing ""...
> STATUS:>      [04/02/2024 13:45:21] Connecting to SFTP server...
> 192.168.1.160:2222 (ip = 192.168.1.160)...
> ERROR:>       [04/02/2024 13:45:22] Disconnect: key exchange failed.
> ERROR:>       [04/02/2024 13:45:22] Check security settings; make sure
> that the username and password are correct, and that the chosen
> encryption algorithms are supported by server.
> STATUS:>      [04/02/2024 13:45:22] Can't connect to 192.168.1.160:2222.
> STATUS:>      [04/02/2024 13:45:22] SFTP connection closed.
>
> The user name and password is OK, no problem there. The chosen
> encryption algorithms are the same on both phones, as the configuration
> of the SSH servers on the phone is the same, apart from the user names
> and passwords. But they are correct.
>
> What may be wrong?
>
> Many thanks in advance for your help.
>
> With regards,
> Fokke Nauta


I'm almost there!

On the S10 phone I removed the SSH server and installed a FTP server.
And this works, apart from the fact that there is a problem with the
directory where the photo's are.

I installed Total Commander File Explorer on the phone and found out
where the photo's are:

/storage/emulated/0/DCIM/Camera

I programmed this in my FTP client on the PC, but it comes with an error:

STATUS:> [07/02/2024 16:45:47] This site supports LANG.
COMMAND:> [07/02/2024 16:45:47] OPTS UTF8 on
[07/02/2024 16:45:47] 200 Command OPTS okay.
STATUS:> [07/02/2024 16:45:47] This site can resume broken downloads.
COMMAND:> [07/02/2024 16:45:47] MODE Z
[07/02/2024 16:45:47] 200 Command MODE okay.
COMMAND:> [07/02/2024 16:45:47] REST 0
[07/02/2024 16:45:47] 350 Restarting at 0. Send STORE or RETRIEVE to
initiate transfer.
COMMAND:> [07/02/2024 16:45:47] CWD /storage/emulated/0/DCIM/Camera
[07/02/2024 16:45:47] 550 No such directory.
ERROR:> [07/02/2024 16:45:47] Requested action not taken (e.g., file
or directory not found, no access).

What may be wrong?

Fokke

Andy Burns

unread,
Feb 7, 2024, 10:58:00 AM2/7/24
to
Fokke Nauta wrote:

> What is a slanted smiley?

:/


Carlos E.R.

unread,
Feb 11, 2024, 9:50:57 AM2/11/24
to
On 2024-02-07 16:55, Fokke Nauta wrote:
> On 04/02/2024 14:02, Fokke Nauta wrote:
>> Hi all,


> I'm almost there!
>
> On the S10 phone I removed the SSH server and installed a FTP server.
> And this works, apart from the fact that there is a problem with the
> directory where the photo's are.
>
> I installed Total Commander File Explorer on the phone and found out
> where the photo's are:
>
> /storage/emulated/0/DCIM/Camera
>
> I programmed this in my FTP client on the PC, but it comes with an error:
>
> STATUS:>      [07/02/2024 16:45:47] This site supports LANG.
> COMMAND:>    [07/02/2024 16:45:47] OPTS UTF8 on
>         [07/02/2024 16:45:47] 200 Command OPTS okay.
> STATUS:>      [07/02/2024 16:45:47] This site can resume broken downloads.
> COMMAND:>    [07/02/2024 16:45:47] MODE Z
>         [07/02/2024 16:45:47] 200 Command MODE okay.
> COMMAND:>    [07/02/2024 16:45:47] REST 0
>         [07/02/2024 16:45:47] 350 Restarting at 0. Send STORE or
> RETRIEVE to initiate transfer.
> COMMAND:>    [07/02/2024 16:45:47] CWD /storage/emulated/0/DCIM/Camera
>         [07/02/2024 16:45:47] 550 No such directory.
> ERROR:>       [07/02/2024 16:45:47] Requested action not taken (e.g.,
> file or directory not found, no access).
>
> What may be wrong?

Explore and find the actual directories it sees. Do an ls or dir.

--
Cheers, Carlos.

0 new messages