1

For research purposes, I use the University server.

The server login is a two-step process.

First, I type

ssh -p 44  linuxuser@jackbio-oopd.res.uk

(Altered for security reason)

Then the password is prompted. I type the credential

Then I type

ssh linuxuser@10.567.96.303

Then the password is prompted. I type the credential

Now if I have to transfer a file (say a pdf file namely first.pdf) to the working directory I use the following code

scp - P 44 first.pdf linuxuser@jackbio-oopd.res.uk:~/

scp first.pdf linuxuser@10.567.96.303:~/

Until here it is clear My doubt begins after this

  1. If I have to bring back the first.pdf from the final working directory to the local machine. (working computer).

How to do it?

  1. I was able to access the intermediate directory (linuxuser@jackbio-oopd.res.uk:~/) through Filezilla. But I was not able to access the final main directory through Filezilla. I tried through other software such as winscp neither it worked. The GUI software generally has a single tab for typing username and password. But here I have 2 step login process. Hence the whole confusion.

How to access the final working directory through a GUI software.

Praveen Kumar-M
  • 592
  • 5
  • 15

2 Answers2

2

rsync command can help you with:

rsync -av -e "ssh -p 44 linuxuser@jackbio-oopd.res.uk" linuxuser@10.567.96.303:~/first.pdf ./

The server linuxuser@10.567.96.303 will be used as a proxy to reach the file on remote host. The file first.pdf will be copied on your local machine.

maruscya
  • 71
  • 3
  • 1
    Are you sure about your command's syntax? I get an error (too long for reporting it here in a comment), while rsync -av -e "ssh -J linuxuser@jackbio-oopd.res.uk:44 linuxuser@10.567.96.303" :~/first.pdf ./ works. Also, I think the "proxy" in the question would be linuxuser@jackbio-oopd.res.uk. – fra-san Aug 29 '20 at 21:43
  • @maruscya I got the following error code on using your codes rsync: connection unexpectedly closed (0 bytes received so far) [Receiver] rsync error: remote command not found (code 127) at io.c(235) [Receiver=3.1.2] – Praveen Kumar-M Aug 30 '20 at 03:57
  • @fra-san please post your comment as an answer. It really worked great. I was not able to find the answer easily in any forum, so it would be greatly beneficial to have it as an accepted answer. – Praveen Kumar-M Aug 30 '20 at 04:02
  • @fra-san is there a way to access the same folder using a GUI – Praveen Kumar-M Aug 30 '20 at 04:09
  • @fra-san is there a way to transfer the file to the final working directory in a single step – Praveen Kumar-M Aug 30 '20 at 06:09
  • 1
    @PraveenKumar-M I'm not fond of posting answers differing from existing answers on syntax details only. Better to have the existing answers improved ;-) Here, it should be enough to just change -p 44 linuxuser@jackbio-oopd.res.uk to -J linuxuser@jackbio-oopd.res.uk:44. Note that --debug=CMD (if your version of rsync supports it) is very handy to debug command line errors. – fra-san Aug 30 '20 at 10:17
1

WinSCP actually supports connecting via an SSH jump server.

Just specify connection data for your intermediate server on the Tunnel page of the advanced site settings.

See also WinSCP guide for Connecting to FTP/SFTP server which can be accessed via another server only.


For Linux command-line solutions, see:
How can I download a file from a host I can only SSH to through another host?