Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»FAQ»bash scp: command not found

    bash scp: command not found

    By RahulJanuary 20, 20151 Min Read

    scp command is used for transferring files between two server over SSH. Most of scp users getting confused scp command is already available on my system but it still showing “bash: scp: command not found”. So remember that scp command must be available on both local and remote systems.

    Advertisement

    Install Package for SCP command

    scp command is comes from package openssh-clients on Red Hat systems and package openssh-client is used for Debian based systems. Use following commands to install package for scp command on Linux operating systems.

    On CentOS/RHEL and Fedora

    # yum install openssh-clients
    

    On Ubuntu and Debian

    $ sudo apt-get install openssh-client
    

    Transfer File Using SCP command

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

    # scp /opt/myfile.txt remote.example.com:/opt/
    

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

    # scp remote.example.com:/opt/myfile.txt /opt/
    

    OpenSSH openssh client scp SSH
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Top 10 JQ Commands Every Linux Developer Should Know

    How to Check if a Program Exists in Linux

    How to Create a Directory If It Does Not Exist in Linux

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to List Manually Installed Packages in Ubuntu & Debian
    • 10 Bash Tricks Every Developer Should Know
    • How to Validate Email Address in JavaScript
    • Firewalld: Common Firewall Rules and Commands
    • 12 Apk Commands in Alpine Linux Package Management
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.