Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 '14 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 '14 at 14:30
2  
Looks like you're feeding it an MP4 file as the ssh_config (-F)?? :) – Ƭᴇcʜιᴇ007 Feb 4 '14 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 '14 at 14:43

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

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .