Blink: scp/sftp doesn't work on non-standard SSH port

Created on 11 Oct 2018  Â·  10Comments  Â·  Source: blinksh/blink

I have configured a host named m and it uses a non-standard SSH port, and I can ssh m/mosh m without issue. However, it seems that scp/sftp still try to connect using port 22. curl makes no progress for over a minute before giving up. According to the remote host's sshd logs, no login attempt was performed.

blink> echo hello > hello.txt
blink> scp hello.txt m:~/hello.txt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:01:14 --:--:--     0curl: (7) Failed to connect to example.com port 22: Operation timed out

Using sftp instead of scp doesn't seem to change anything. I have also tried using -p or -P to change the port.

Running Blink version 11.26 from App Store.

RTT

Most helpful comment

OK It worked, both ways. Thank you.

All 10 comments

Yep, this is known issue and will be fixed in next release.

https://github.com/holzschu/ios_system/pull/67

Thank you.

Not fixed in version 12.1 from App Store.

So, there is no yet way to scp with non standard port?

@idchlife and @0x0000null

Actually scp will pickup port from 'config' -> 'host' setting.
But first you have to 'ssh2' first to that host. It will add host to known hosts with rsa. (ssh currently adds esdsa, and scp doesn't recognize it)

we need to reimplement scp on top of libssh or OpenSSH

wow, thanks for the information! It will help a lot!

For more options, visit https://groups.google.com/d/optout.
On 14 Nov 2018, 16:17 +0300, Yury Korolev notifications@github.com, wrote:

@idchlife and @0x0000null
Actually scp will pickup port from 'config' -> 'host' setting.
But first you have to 'ssh2' first to that host. It will add host to known hosts with rsa. (ssh currently adds esdsa, and scp doesn't recognize it)
we need to reimplement scp on top of libssh or OpenSSH
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Actually, found a bug with fresh compile. Fixed build 56

Fixed in version 12.2. (scp may still have issues: #624)

Hi @yury it seems that scp on Build 57 still not working.

blink> scp -v DockerIntro.pdf AI2:DockerIntro.pdf
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 10.64.*....

  • TCP_NODELAY set
  • Connected to 10.64.. (10.64..) port 822 (#0)
  • SSH MD5 fingerprint: adf6748**
  • SSH host check: 0, key: AAAAB3*
  • SSH authentication methods available: publickey
  • Using private key stored in BlinkShell keys: 'id_rsa'
  • Initialized SSH public key authentication
  • Authentication complete
  • SSH CONNECT phase done
  • failed to send file
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  • Connection #0 to host 10.64.*. left intact
    curl: (79) failed to send file
    blink> help

Blink: v12.2.57. Nov 16 2018

Hi @thariman!

can you try with full destination path?

scp -v DockerIntro.pdf AI2:~/DockerIntro.pdf

OK It worked, both ways. Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jasondinh picture jasondinh  Â·  3Comments

basepi picture basepi  Â·  5Comments

jra picture jra  Â·  5Comments

dlasky picture dlasky  Â·  4Comments

carloscabanero picture carloscabanero  Â·  4Comments