holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.63k stars 116 forks source link

scp port specification #118

Open virtualpps opened 3 years ago

virtualpps commented 3 years ago

Nicholas, attempting the scp and specifying port number, but get error from curl cannot open. Telnet shows port open. Tried syntax with -p and -P and port is not recognized. example: scp -p 1234 localfile user@IP:remotefile

curl: Can't open '1234'!

holzschu commented 3 years ago

For the time being, scp and sftp are aliased to curl scp://user@host/.... This makes the app smaller by reusing code, but it also means that scp and sftp use the curl syntax rather than their usual syntax. Porting the code from the actual scp and sftp commands is on the TODO list.

I think you can use curl directly for this: curl -T localfile scp://user@host:1234/remotefile.

virtualpps commented 3 years ago

Hi Nicholas,

Is it possible to switch user to root in a-shell?

On Tue, 13 Oct 2020 at 02:35, Nicolas Holzschuch notifications@github.com wrote:

For the time being, scp and sftp are aliased to curl scp://user@host/.... This makes the app smaller by reusing code, but it also means that scp and sftp use the curl syntax rather than their usual syntax. Porting the code from the actual scp and sftp commands is on the TODO list.

I think you can use curl directly for this: curl -T localfile scp://user@host:1234/remotefile.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/holzschu/a-shell/issues/118#issuecomment-707124204, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4UMYCHOP5QFOZSIUCHWN3SKMA3XANCNFSM4SMUAPXA .

-- Sent from Gmail Mobile

holzschu commented 3 years ago

No, you can not switch to user root. That would be in direct contradiction of the AppStore rules.

virtualpps commented 3 years ago

Thanks

holzschu commented 3 years ago

Hi, scp port specification is now available (since version 1.7.0, where we switched to the source from the original scp).