-1

I'm on a virtual machine trying to copy a file from SSH to local system. Using Debian. I don't see the "Connect to" option. When I try to do it trough terminal, I enter

scp [myusername@remote.system]:[path to the file obtained using "find"]

and it just gives me options for scp usage like -c etc If I enter the above command and add Downloads, it says file name and 100%, size etc, but the Downloads folder is empty What am I doing wrong? Please help!

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
AlterJ
  • 11
  • 1

2 Answers2

1

I would suggest cding to the target directory and then doing the following:

  1. touch dummyfile - check if you have the permissions to create locally.
  2. Check you can SSH into the remote location and read the file you are trying to copy. Try ssh -vvv to debug connectivity and ssh key issues.
  3. scp user@remote . - the dot here is the current directory, so scp should then copy the file locally.

Hope you find this helpful.

Gaurav
  • 153
1

Try this:

scp remoteuser@server:.bash_history newfile

Only need to change two things: name of remoteuser & name of server

If it works you should end up with a file on the local PC called newfile. There's a small chance that it doesn't work if you don't have .bash_history on the remote machine, but it's worth the gamble.

bitofagoob
  • 1,405