bash scp: command not found solution

不言
Release: 2019-03-18 16:12:52
Original
10805 people have browsed it

The scp command is used to transfer files between two servers via ssh. Most scp users can already use the scp command in their system, but it still shows "bash:scp:command not found". Therefore, note that the scp command must be available on both the local and remote systems to avoid this problem.

bash scp: command not found solution

Install the SCP command package

The scp command comes from the openssh-clients package on the Red Hat system, openssh-client package For Debian based systems. You can use the following command to install the scp command package on Linux operating systems.

CentOS/RHEL and Fedora

#yum install openssh-clients
Copy after login

Ubuntu and Debian

$ sudo apt-get install openssh-client
Copy after login

Transfer files using SCP commands

Local to remote: To To transfer the file /opt/myfile.txt from the local to the /opt/directory of the remote (remote.example.com) system, you can use the following command.

# scp /opt/myfile.txt remote.example.com:/opt/
Copy after login

Remote to local: To transfer the file /opt/myfile.txt from the remote (remote.example.com) system to the local system /opt directory, use the following command.

#scp remote.example.com:/opt/myfile.txt / opt /
Copy after login

This article has ended here. For more exciting content, you can pay attention to other related column tutorials on the php Chinese website! ! !

The above is the detailed content of bash scp: command not found solution. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!