Reputation: 31252
I am trying to scp from remote to my local. I am already logged on my remote host. I tried this
scp -r hw8/ peke:~/Desktop/
ssh: Could not resolve hostname peke: Name or service not known
my local computer name is peke, which I can see from bash terminal.
however, I logged out of my remote and then did scp from remote host to local and it worked fine. I am trying to figure why the above method failed. Thanks for your input
Upvotes: 1
Views: 1745
Reputation: 585
You should change your hostname to FQDN hostname like srv.hostname.com and then try it with that hostname.
Before using the FQDN hostname also make sure that your local host is accessible from remote host by pinging your hostname from remote host.
Replace hostname with your hostname
ping hostname
if not then try with your IP.
Upvotes: 1