edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* ftp scp uploads
@ 2022-07-11  5:11 Karl Dahlke
  2022-07-11  6:18 ` Dominique Martinet
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Dahlke @ 2022-07-11  5:11 UTC (permalink / raw)
  To: edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]

Dave gave me something interesting to work on, (thank you), and so I did.
ftp and scp uploads.
But I have only been able to test scp, I don't have a writeable ftp server handy, so can't guarantee that one.
But scp is pretty cool. Give it a try.

e scp://login:password@whatever.com/home/mylogin/some_file
make some changes
w
q

It all works, but, as I mentioned on the chat group,
1. I can't use keys to ssh in; I have to specify login and password, which is kind of a pain. Is that a limitation of curl, or is there some other way to tell it to use public keys? Some sites only allow for ssh with keys.
2. I have to specify the absolute path, it starts from / not from my home directory. This is different I think from how ftp works. Also different from the shell scp command, so is confusing.

I haven't documented these in detail, not sure how they work yet, or even if ftp works at all.
I did add them to the quick list of commands, that you see by typing help.

The downloads, like all downloads, can happen in the background, if bg is set,
but uploads are always in foreground.
I think this is reasonable, you're more likely to ftp down a huge file, than to ftp up.

Karl Dahlke

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ftp scp uploads
  2022-07-11  5:11 ftp scp uploads Karl Dahlke
@ 2022-07-11  6:18 ` Dominique Martinet
  0 siblings, 0 replies; 2+ messages in thread
From: Dominique Martinet @ 2022-07-11  6:18 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: edbrowse-dev

Nice!

Karl Dahlke wrote on Mon, Jul 11, 2022 at 01:11:18AM -0400:
> But scp is pretty cool. Give it a try.

Just a warning here: scp the command won't go away, but it switched to
using sftp as underlying protocol in the latest openssh version (8.9)

I'm assuming scp (the protocol) will eventually get disabled, and we
should probably support sftp:// instead -- curl also has support so it
should be the same

> 1. I can't use keys to ssh in; I have to specify login and password,
> which is kind of a pain. Is that a limitation of curl, or is there
> some other way to tell it to use public keys? Some sites only allow
> for ssh with keys.

That should be possible, curl the command has --key / --pubkey to
provide the keypair
(since 7.16.2 according to the documentation)

From a quick grep it looks like the curlopt equivalents are
CURLOPT_SSH_PRIVATE_KEYFILE
CURLOPT_SSH_PUBLIC_KEYFILE
which should be usable with file path? I haven't tried.


> 2. I have to specify the absolute path, it starts from / not from my
> home directory. This is different I think from how ftp works. Also
> different from the shell scp command, so is confusing.

Not sure but that might be different with sftp as well, might be worth
testing.

--
Dominique


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-11  6:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11  5:11 ftp scp uploads Karl Dahlke
2022-07-11  6:18 ` Dominique Martinet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).