Accessing data using sftp
There is the possibility to use sftp for retrieving data from MAX IV (as an alternative to using Globus). Click on the links below to get information on each subject:
- You need to registered a telephone number in DUO where you can receive SMS in order to complete the two-factor authentication login at MAX IV. To verify or change the phone number, log into DUO and go to your personal information under Account Settings. The phone used to send SMS must be the one listed as your primary phone.
1. From Linux, simply type sftp ‘maxiv_user_name’@sftp.maxiv.lu.se on the command line, where ‘maxiv_user_name’ is the same user name you use to log in to DUO or the beamline computers.
You will first be asked to log in using your MAX IV credentials.
Next you need to provide the “otp” code, which will be sent to your mobile number via SMS.
2. Go to the directory that you want to transfer. This will typically be under /data/visitors/’beamline’/’your_proposal’/’date’/etc…
E.g. cd /data/visitors/biomax/20181234/20181110/
3. get -R <dir>
this command will recursively download the directory dir to the path where you started sftp.
Typing “help” returns a list of commands
Available commands: bye Quit sftp cd path Change remote directory to 'path' chgrp grp path Change group of file 'path' to 'grp' chmod mode path Change permissions of file 'path' to 'mode' chown own path Change owner of file 'path' to 'own' df [-hi] [path] Display statistics for current directory or filesystem containing 'path' exit Quit sftp get [-afPpRr] remote [local] Download file reget [-fPpRr] remote [local] Resume download file reput [-fPpRr] [local] remote Resume upload file help Display this help text lcd path Change local directory to 'path' lls [ls-options [path]] Display local directory listing lmkdir path Create local directory ln [-s] oldpath newpath Link remote file (-s for symlink) lpwd Print local working directory ls [-1afhlnrSt] [path] Display remote directory listing lumask umask Set local umask to 'umask' mkdir path Create remote directory progress Toggle display of progress meter put [-afPpRr] local [remote] Upload file pwd Display remote working directory quit Quit sftp rename oldpath newpath Rename remote file rm path Delete remote file rmdir path Remove remote directory symlink oldpath newpath Symlink remote file version Show SFTP version !command Execute 'command' in local shell ! Escape to local shell ? Synonym for help