Downloading files from HPC to local?

Downloading files from HPC to local?

by Arjun Lenan Sandhya -
Number of replies: 3

Hi all,

I was trying to copy the textfile output generated by my benchmark code to my locap cip machine using "scp" command but it is asking asking for my HPC "password" even 
when I am logged into the HPC machine. Below is the Linux command used:
scp ptfs2xxh@fritz.nhr.fau.de:/ptfs/assignment2/benchmarkop.txt /home/cip/ce/foxxpahy/
This returns the output:
ptfs2xxh@fritz.nhr.fau.de's password:

Any help would be appreciated:)
In reply to Arjun Lenan Sandhya

Re: Downloading files from HPC to local?

by Jan Laukemann -

Hi Arjun,

try to add the location of your SSH key to your scp command:

scp -i identity_file user@host:path/to/source/file /path/to/destination/

Also, please check your file path again, right now you are pointing to /ptfs on fritz, which does not exist, you probably mean ~/ptfs

In reply to Jan Laukemann

Re: Downloading files from HPC to local?

by Arjun Lenan Sandhya -
Thank you Jan! It worked. However, it required me to exit the cluster to the cip's terminal and running the command. I was wondering if there was a way to copy files from the cluster to local 'while being logged into the cluster terminal'? Is that not possible?
In reply to Arjun Lenan Sandhya

Re: Downloading files from HPC to local?

by Jan Laukemann -
As described before, all scp takes is the source and the destination.
Of course, you can also have a different system in your destination path and do something such as
  scp ./this-file.txt user@host:~/thatfile.txt
if (like in any case) the host is visible from the local system you are running the command on (i.e., reachable via IP or known hostname) and the port (by default 22) is open on both hosts.

There is plenty of documentation on the internet on how to use scp if you are not familiar with its usage.