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 am using scp command to copy file from a MacBook Pro OS X 10.5 to another Linux box (Red Hat Linux Enterprise 5).

I am using the following command on Mac, sudo scp ~/.ssh/mykey.rsa testuser@10.10.100.101, there is no output from Mac command line. I am not sure whether the scp is success or not. Where is the location the file mykey.rsa on remote computer 10.10.100.101?

thanks in advance, George

share|improve this question

migrated from stackoverflow.com May 17 '10 at 6:51

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

up vote 5 down vote accepted

The mykey.rsa file has been renamed to testuser@10.10.100.101 on the Mac. It has not been copied to the 10.10.100.101 machine at all.

It's because the destination address wasn't in the correct format. When using scp, any filename that refers to another machine must be specified in the following format:

username@host:path

The colon between the user@host and path is important. Without the colon, scp will not treat it as an address of another machine and will instead assume it's just an oddly-formatted local filename.

To copy the mykey.rsa file, you should probably use a command like

scp ~/.ssh/mykey.rsa testuser@10.10.100.101:.ssh/mykey.rsa
share|improve this answer
    
Thanks, question answered! –  George2 May 17 '10 at 6:53
add comment

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.