Score:0

Copying from remote server to local using SCP/ Name of service not know ssh error

ph flag

I am trying to copy a folder from a secured remote server to my local disk. When I try to copy with the following:

[banikr@vcn1 rat_SCI_data]$ scp -r /MAL_Test_Case/ banikr2@banikr:/media/banikr2/DATA/MAL/fromfmri/

I get the following error:

ssh: Could not resolve hostname banikr: Name or service not known
lost connection

To be exact I want to copy MAL_Test_Case to my local path/drive.

Any help?

pLumo avatar
in flag
"*Could not resolve hostname `banikr`*" is a pretty decent error description. Did you investigate in this direction?
banikr avatar
ph flag
Yeah I did. In all the discussions `ssh` was used and I actually tried that without any luck. And not one I found so far that has `scp` involved too.
hr flag
You say you want to copy a file **from** a remote server, yet you are giving a local source path `/`. I *suspect* that you have SSH'd in to the remote server and are trying to push the file back to your local machine, which likely isn't running an SSH server or isn't accessible from the public network. Instead, use scp from the *local* machine to pull the file.
banikr avatar
ph flag
I actually found a workaround. I used scp from my local terminal and copied from remote one. Then it only asks for pw. `banikr2@banikr:/media/banikr2/DATA/MAL$ scp -r [email protected]:/home/primatefmri/SCI_data/MAL_Test_Case fromfmri/` This actually worked.
pLumo avatar
in flag
@steeldriver good find, I guess you should post it as answer :-)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.