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


    <myusername> ssh username
    <hostname> like 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
    Average: 5 (1 vote)