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 on mac osx getting a file from a remote server. I run the following command:

scp remoteusername@remotehostip:/home/username/file.tar ./Users/localusername/Documents/specialdir

I get the response

scp: /home/username/file.tar: no such file or directory

However when I ssh into the remote host and run

cd /home/username
ls

file.tar is displayed. I have full read/write permissions for the directory/files. This is run in a new terminal (ie I am not already logged in via ssh to the remote host) What am I doing wrong?

Edit

I worked around it using the * wildcard..although I'm still not sure what the root issue is/was.

share|improve this question
    
You point that you use remoteusername to connect and then trying to get file from directory /home/username. Is it the same user or different users? –  Serge Oct 16 '12 at 20:32
    
Are you logging in as the same user that you're SCPing with? –  Paul Calabro Oct 16 '12 at 20:35
    
@Serge yes it's the same user. –  KDEx Oct 16 '12 at 20:35
    
did you try this: scp remoteusername@remotehostip:file.tar ./Users/localusername/Documents/specialdir ? –  Serge Oct 16 '12 at 20:40
    
@Serge I did and I get the same error message –  KDEx Oct 16 '12 at 20:43
show 4 more comments

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.