I was trying to copy a file from remote server using SCP but its giving the following error.
bash-3.2$ scp username@server:main.php C:\main.php
ssh: Could not resolve hostname C: hostname nor servname provided, or not known
Its assuming C: as hostname but its just the drive name..Please let me how to specify explicitly like some escaping to get rid of this issue.
If i don't specify the path where to save on local desktop,its working fine.
bash-3.2$ scp username@server:main.php main.php
main.php 100% 29KB 28.9KB/s 00:01
Appreciate any help..
Thanks in advance,
PS: Using Windows XP SP2
Best Answer
If you are using Cygwin's
scp
, you might try using the Cygwin paths:You could also use the
pscp
andpsftp
commands included in the PuTTY package – they are native Win32 programs and won't complain about Windows paths.Alternatively, WinSCP is a good SCP/SFTP client (primarily a GUI, though also comes with a command-line tool).