注意:
发出curl命令的操作系统版本是rhel8.0
192.168.80.187的操作系统版本是rhel7.5
[root@rhel8server1 ~]# curl -N -k -u root:bbbbbb -O "scp://192.168.80.187/root/i-am-from-rhel7.5.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:00:10 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:10 --:--:-- 0
[root@rhel8server1 ~]# echo $?
0
[root@rhel8server1 ~]# ll
total 12
-rw-------. 1 root root 1267 May 19 09:52 anaconda-ks.cfg
drwxr-xr-x. 2 root root 6 May 19 11:50 Desktop
drwxr-xr-x. 2 root root 6 May 19 11:50 Documents
drwxr-xr-x. 2 root root 6 May 19 11:50 Downloads
-rw-r--r--. 1 root root 0 Jun 1 14:49 i-am-from-rhel7.5.txt ---->>>>有此文件。
-rw-r--r--. 1 root root 4 Jun 1 14:25 i-am-from-rhel8.txt
-rw-r--r--. 1 root root 1422 May 19 11:47 initial-setup-ks.cfg
drwxr-xr-x. 2 root root 6 May 19 11:50 Music
drwxr-xr-x. 2 root root 6 May 19 11:50 Pictures
drwxr-xr-x. 2 root root 6 May 19 11:50 Public
drwxr-xr-x. 2 root root 6 May 19 11:50 Templates
drwxr-xr-x. 2 root root 6 May 19 11:50 Videos
[root@rhel8server1 ~]# curl -V
curl 7.61.1 (x86_64-redhat-linux-gnu) libcurl/7.61.1 OpenSSL/1.1.1 zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.8.5/openssl/zlib nghttp2/1.33.0
Release-Date: 2018-09-05
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz brotli TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL Metalink
[root@rhel8server1 ~]#