How to download file via scp

    To download file using scp you need ssh username, password and host 1. First open terminal and type
    mohit@ubuntu: scp <myusername>@<hostname>:<pathtofile>

    Press enter

    Yes to add to known hosts

    Enter ssh password and done file start downloading to you local

    mohit@ubuntu: ls
    file will be displayed to you

    Where

    <myusername> ssh username
    <hostname> like mohitsharma.net or whatever it is to be
    <pathtofile> file path with filename to download like /var/www/test.sql

    Note: use sudo with scp command if you don't have root permissions
    5
    Average: 5 (1 vote)

    User login