Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I try to use scp over IPv6 addresses I get this:

scp -6 osis@::1:/home/osis/test.file ./test.file ssh: Could not resolve hostname : Name or service not known

using ssh osis@::1 i get login into my box without a hitch

With scp all I ever get is ssh: Could not resolve hostname : Name or service not known

share|improve this question
add comment

1 Answer

up vote 11 down vote accepted

You need some brackets in your command:

scp -6 osis@\[::1\]:/home/osis/test.file ./test.file

Otherwise the first ':' symbol is thought to be the separator between the file and the address parts and it thinks you want to ssh to '' blank.

share|improve this answer
    
thank you for your answer, this info was somehow missing from man scp;man ssh –  Osis Nov 22 '10 at 14:24
1  
Consider submitting an updated man page, then you can say: I helped. –  Martin Owens -doctormo- Nov 22 '10 at 17:26
1  
When using the -6 flag, you can just type localhost instead of ::1 (which is the IPv6 Address for localhost) to avoid the brackets and therefore any need to escape something on the shell: scp -6 osis@localhost:/home/osis/test.file ./test.file –  freddyb Apr 30 '11 at 16:22
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.