Search code examples
scp

Get and send a file with SCP using options


How to write scp user@url:/tmp/foo ./ with options instead of one-liner ?

I tried this, but unsuccessfully:

scp -l user url /tmp/foo ./

Solution

  • Send file

    scp -o user=myuser foo.txt myserver:/my/folder
    

    Get file

    scp -o user=myuser myserver:/my/folder/foo.txt ./