New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scp/sftp doesn't work on non-standard SSH port #564

Closed
0x0000null opened this Issue Oct 11, 2018 · 10 comments

Comments

Projects
None yet
4 participants
@0x0000null
Copy link

0x0000null commented Oct 11, 2018

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.

@yury

This comment has been minimized.

Copy link
Collaborator

yury commented Oct 11, 2018

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

holzschu/ios_system#67

Thank you.

@yury yury added the RTT label Oct 15, 2018

@0x0000null

This comment has been minimized.

Copy link

0x0000null commented Nov 4, 2018

Not fixed in version 12.1 from App Store.

@idchlife

This comment has been minimized.

Copy link

idchlife commented Nov 14, 2018

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

@yury

This comment has been minimized.

Copy link
Collaborator

yury commented Nov 14, 2018

@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

@idchlife

This comment has been minimized.

Copy link

idchlife commented Nov 14, 2018

@yury

This comment has been minimized.

Copy link
Collaborator

yury commented Nov 15, 2018

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

@0x0000null

This comment has been minimized.

Copy link

0x0000null commented Nov 25, 2018

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

@thariman

This comment has been minimized.

Copy link

thariman commented Nov 29, 2018

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

@yury

This comment has been minimized.

Copy link
Collaborator

yury commented Nov 29, 2018

Hi @thariman!

can you try with full destination path?

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

@thariman

This comment has been minimized.

Copy link

thariman commented Nov 29, 2018

OK It worked, both ways. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment