How to transfer file from one server to other via scp

    To transfer file from one server to another using scp 1. Open terminal and connect to server via ssh
    mohit@ubuntu: ssh usrname@mohitsharma.net
    Enter password:

    username@mohitsharma.net ]:

    Go to directory from where file is to be transfered

    Then type following command

    username@mohitsharma.net ]: scp filename username@remoterhost:<pathtofile>

    Enter

    Add to known host yes

    Enter remote password

    its starts transfer and file will be transfered
    5
    Average: 5 (1 vote)