bash scp:未找到命令的解决方法
程序员文章站
2022-04-02 13:56:04
...
scp命令用于通过ssh在两台服务器之间传输文件。大多数scp用户在系统中已经可以使用scp命令,但它仍然显示“bash:scp:command not found”。因此注意,scp命令必须在本地和远程系统上都可用才可以避免这个问题。
安装SCP命令包
scp命令来自Red Hat系统上的openssh-clients软件包,openssh-client软件包用于基于Debian的系统。可以使用以下命令在Linux操作系统上安装scp命令包。
CentOS / RHEL和Fedora
#yum install openssh-clients
Ubuntu和Debian
$ sudo apt-get install openssh-client
使用SCP命令传输文件
本地到远程:要将文件/opt/myfile.txt从本地传输到远程(remote.example.com)系统的/opt/directory,可以使用以下命令。
# scp /opt/myfile.txt remote.example.com:/opt/
远程到本地:要将文件/opt/myfile.txt从远程(remote.example.com)系统传输到本地系统/ opt目录,使用以下命令。
#scp remote.example.com:/opt/myfile.txt / opt /
本篇文章到这里就已经全部结束了,更多其他精彩内容可以关注的其他相关栏目教程!!!
以上就是bash scp:未找到命令的解决方法的详细内容,更多请关注其它相关文章!
上一篇: PHP 协程是什么意思?
下一篇: 为什么学linux
推荐阅读
-
pip命令无法使用的解决方法
-
MySQL从命令行导入SQL脚本时出现中文乱码的解决方法
-
bash脚本中将密码传递给ssh/scp命令方法详解
-
Laravel执行migrate命令提示:No such file or directory的解决方法
-
Win7命令窗口提示javac不是内部或外部命令的原因以及解决方法
-
解决maven执行命令时提示:cached in the local repository的解决方法小结
-
linux scp命令的用法详解
-
linux bash中too many arguments问题的解决方法
-
bash脚本输入密码不回显问题的解决方法
-
无法使用pip命令安装python第三方库的原因及解决方法