Opened 4 months ago

Closed 5 weeks ago

#2956 closed help (answered)

Transfer of data from JASMIN to a PC

Reported by: NoelClancy Owned by: pmcguire
Component: Other Keywords:
Cc: Platform: JASMIN
UM Version:

Description

How do you transfer .nc or .pdf files from JASMIN to a directory on a PC from the command line?

I usually used to do it by opening a SFTP session on MobaXTerm in JASMIN but I cannot navigate through the files on JASMIN anymore because this window in JASMIN has become unresponsive.

Change History (10)

comment:1 Changed 4 months ago by pmcguire

  • Owner changed from um_support to pmcguire
  • Status changed from new to accepted

Hi Noel:
Usually, I do not use sftp to JASMIN, whether it be with a GUI or at the command-line without a GUI.

You could use scp. That is what I normally do.
There is some simple guidance about how to use scp on JASMIN in step#12 of the JULES/FLUXNET/ROSE/CYLC tutorial on the University of Reading's Land Surface Processes website:
https://research.reading.ac.uk/landsurfaceprocesses/software-examples/tutorial-rose-cylc-jules-on-jasmin/

I can give further help with scp if you need it. Just ask.

If you want to navigate while using scp, that is not the right tool and I advise using the command-line sftp instead. Alternatively, you could figure out what files you want by having a separate ssh session open and using the ls or find commands, and then using scp.
Patrick

Last edited 4 months ago by pmcguire (previous) (diff)

comment:2 Changed 4 months ago by pmcguire

Hi Noel
Did this work? Do you need further help with scp?
Does the sftp GUI still not work in MobaXTerm? I was able to get Filezilla working to JASMIN, and that might be an alternative as well.
Patrick

comment:3 Changed 4 months ago by NoelClancy

It did not work.

I tried "scp -pr jasmin-xfer1.ceda.ac.uk:run11a_plots run11a_plots" as advised from the link (step 12) but it said "access denied"

comment:4 Changed 4 months ago by pmcguire

Hi Noel:
Maybe your ssh key is not set up properly?
Can you do an ssh jasmin-xfer1.ceda.ac.uk?

Do you have everything setup like in the steps: ‘Configuring your own laptop or desktop machine’ and ‘Logging on to JASMIN’ of https://code.metoffice.gov.uk/trac/jules/wiki/RoseJULESonJASMIN
??

Patrick

comment:5 Changed 4 months ago by NoelClancy

vim ~/.ssh/config

E325: ATTENTION
Found a swap file by the name "~/.ssh/.config.swp"

owned by: nmc dated: Wed Jul 4 12:40:07 2018

file name: ~nmc/.ssh/config

modified: YES

user name: nmc host name: jasmin-sci1.ceda.ac.uk

process ID: 13681

While opening file "/home/users/nmc/.ssh/config"

dated: Thu Apr 11 09:47:00 2019

NEWER than swap file!

(1) Another program may be editing the same file. If this is the case,

be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.

(2) An edit session for this file crashed.

If this is the case, use ":recover" or "vim -r /home/users/nmc/.ssh/config"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/home/users/nmc/.ssh/.config.swp"
to avoid this message.

Swap file "~/.ssh/.config.swp" already exists!
"~/.ssh/config" 25L, 501C
Swap files found:

Using specified name:

  1. .config.swo

owned by: nmc dated: Wed Jul 4 12:47:58 2018

file name: ~nmc/.ssh/config

modified: YES

user name: nmc host name: jasmin-sci1.ceda.ac.uk

process ID: 28670

  1. .config.swp

owned by: nmc dated: Wed Jul 4 12:40:07 2018

file name: ~nmc/.ssh/config

modified: YES

user name: nmc host name: jasmin-sci1.ceda.ac.uk

process ID: 13681

In directory ~/tmp:

— none —

In directory /var/tmp:

— none —

In directory /tmp:

— none —

Enter number of swap file to use (0 to quit):

comment:6 Changed 4 months ago by NoelClancy

Yes I can do the following, it's working

ssh jasmin-xfer1.ceda.ac.uk

comment:7 Changed 4 months ago by pmcguire

Hi Noel:
Is only the ssh to jasmin-xfer1 working? Or does the scp work too?
Patrick

comment:8 Changed 4 months ago by pmcguire

Hi Noel
Just to write down what we did together.
The ssh was not working directly from your PC (in MobaXterm) to jasmin-xfer1.
You were ssh-ing from your PC in MobaXterm first to oak or the met-cluster, and then ssh-ing to jasmin-xfer1. This partially explains why your sftp GUI in MobaXterm on your PC was not working to jasmin-xfer1. You explained to me that your ssh key had recently changed. So we copied your new ssh key from oak or the met-cluster to your PC in your .ssh directory, using scp, and then you did the ssh-add again with your ssh key, and everything worked! Now the sftp GUI works in your MobaXterm on your PC, to jasmin-xfer1, as does the scp on the command line in MobaXterm to jasmin-xfer1. For using the sftp GUI in MobaXterm, it's important to select 'use private key' in the options instead of 'use password'.

One very important benefit of this change, is that now you shouldn't need any more to first log in to oak or the met-cluster before logging into jasmin-sci*. Also, you shouldn't need to log into jasmin-login1 before logging into jasmin-sci*. Can you check that these facts are now true?

Can you also check that everything works fine when you close your MobaXterm application, and then restart MobaXterm? Sometimes MobaXterm will erase its local UNIX files (i.e., in the .ssh directory), unless you have the switches set properly to avoid this. Once you check that, then I can close this ticket.
Patrick

comment:9 Changed 5 weeks ago by pmcguire

I'm closing this ticket now.
Patrick

comment:10 Changed 5 weeks ago by pmcguire

  • Resolution set to answered
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.