Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking to SCP a file on a remote host which I usually would SSH into. I have a config file setup when I SSH which saves alot of time and typing. I'm trying to do something similar for SCP in that I want to copy a remote file locally but don't want to have to type the IP/host etc. Is that possible?

Trying to get this to work with SCP -F but also need to sub-verse out of my home directory...

Here's where I'm at, where myserver is the name of the host specified in the SSH config file.

scp -v -F myserver://var/www/html/file01/sampledir/329/619/myfile.mp4 /Users/Tony/Desktop
share|improve this question
    
Where is the question? Does it work? If not, where does it fail? –  MariusMatutiae Feb 4 at 14:28
    
Sorry, no it does not work - getting the below usage: scp [-1246BCEpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2[code] –  Tony Feb 4 at 14:30
2  
Looks like you're feeding it an MP4 file as the ssh_config (-F)?? :) –  Ƭᴇcʜιᴇ007 Feb 4 at 14:39
    
I have it working on my system, as follows: scp remotehost:/home/myname/myfile . And it works. Drop the -F option, and you are ok. –  MariusMatutiae Feb 4 at 14:43

1 Answer 1

Just save the config file as ~/.ssh/config, and it'll be used without the need for a -F flag.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.