Answer the question
In order to leave comments, you need to log in
How to download a file from a site using the scp and sftp command?
According to the assignment, at first there was interaction using ssh and sftp, in fact, with itself, connecting to localhost, with which there were no problems, just the scp and get commands, respectively.
However, the next task is to download a file from some remote resource. The following is given as an example: ftp://ftp.hp.com:21/pub/softpaq/sp40001/sp40001.cva Failed
to solve "on the forehead" - scp ftp://ftp.hp.com:21/pub/softpaq /sp40001/sp40001.cva localhost gives an error, it also failed to connect via ssh to ftp.hp.com. So what to do in this situation?
Answer the question
In order to leave comments, you need to log in
scp to connect via ssh
to download via ftp It is logical to use wget
wget ftp://ftp.hp.com/pub/softpaq/sp40001/sp40001.cva
curl is a high-level utility that supports almost all protocols
DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP.
tar -c /source/files | ssh [email protected] "cd /path/to/;tar -x --"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question