Skip to content
Snippets Groups Projects
Commit d64e4353 authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

add ttyrec to login, transfer and modules

parent 129faab6
No related branches found
No related tags found
No related merge requests found
...@@ -58,6 +58,7 @@ Last login: Tue Jul 9 15:57:38 2013 from your-host.example.com ...@@ -58,6 +58,7 @@ Last login: Tue Jul 9 15:57:38 2013 from your-host.example.com
[username@login2.salomon ~]$ [username@login2.salomon ~]$
``` ```
Example to login on Salomon
<tty-player controls src=/src/login.ttyrec></tty-player> <tty-player controls src=/src/login.ttyrec></tty-player>
!!! Note "Note" !!! Note "Note"
...@@ -107,6 +108,9 @@ local $ sshfs -o IdentityFile=/path/to/id_rsa username@salomon.it4i.cz:. mountpo ...@@ -107,6 +108,9 @@ local $ sshfs -o IdentityFile=/path/to/id_rsa username@salomon.it4i.cz:. mountpo
Using sshfs, the users Salomon home directory will be mounted on your local computer, just like an external disk. Using sshfs, the users Salomon home directory will be mounted on your local computer, just like an external disk.
Example to transfer data
<tty-player controls src=/src/transfer.ttyrec></tty-player>
Learn more on ssh, scp and sshfs by reading the manpages Learn more on ssh, scp and sshfs by reading the manpages
```bash ```bash
......
...@@ -23,6 +23,8 @@ then ...@@ -23,6 +23,8 @@ then
module list # Display loaded modules module list # Display loaded modules
fi fi
``` ```
Example display informations to standard output
<tty-player controls src=/src/modules.ttyrec></tty-player>
!!! Note "Note" !!! Note "Note"
Do not run commands outputing to standard output (echo, module list, etc) in .bashrc for non-interactive SSH sessions. It breaks fundamental functionality (scp, PBS) of your account! Take care for SSH session interactivity for such commands as stated in the previous example. Do not run commands outputing to standard output (echo, module list, etc) in .bashrc for non-interactive SSH sessions. It breaks fundamental functionality (scp, PBS) of your account! Take care for SSH session interactivity for such commands as stated in the previous example.
......
# login to Salomon cluster from local linux machine
ssh -i /home/local/.ssh/id_rsa dd-16-12-13@salomon.it4i.cz
# successfull login to cluster
# run htop command
htop
# logout from cluster
logout
ssh -i /home/local/.ssh/id_rsa dd-16-12-13@salomon.it4i.cz
# working with modules
# get the current version of Python
$ python --version
# run Python
python
# right now is version 2.6.6
# search all available Python's modules
module avail |& grep Python/
# for example let's choose a new module Python 3.5.1
$ module load Python/3.5.1-intel-2016.01
# and now get the current version of Python
$ python --version
# run Python
python
# that's correct, version 3.5.1
# now turn back to old version you have to unload module
$ module unload Python/3.5.1-intel-2016.01
$ python -- version
# Python version 2.6.6 is ready to use now
File added
# file transfer from local machine to the remote cluster
# toto i v CZ
# create local directory with files
$ mkdir folder
$ cd folder
# using scp command to transfer a file
$ touch test_file.scp
$ scp test_file.scp dd-16-12-13@salomon.it4i.cz:/home/training/dd-16-12-13/test_file.scp
# using scp command to transfer a directory
$ mkdir local_dir
$ touch local_dir/file
$ scp -r local_dir dd-16-12-13@salomon.it4i.cz:/home/training/dd-16-12-13/local_dir
# using sftp command
$ touch test_file.sftp
$ sftp -o IdentityFile=/home/local/.ssh/id_rsa dd-16-12-13@salomon.it4i.cz
# ukazat i interaktivni rezim
# commands: https://www.digitalocean.com/community/tutorials/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server
# list of all commands - help or ?
sftp> help
# display remote working directory on Salomon
sftp> pwd
# display remote directory listing on Salomon
sftp> ls -la
# display statistics for remote directory
sftp> df -h
# display local working directory on linux machine
sftp> lpwd
# display local directory listing on linux machine
sftp> lls -la
# now we can upload a file from linux machine to Salomon
sftp> put test_file.sftp
# and then check if successfull uploaded
sftp> ls -l
# of course we can download a file from remote machine
sftp> get tutorial.tgz
# and check in local directory
sftp> lls -l
# delete local file from sftp
sftp>!rm tutorial.tgz
# quit sftp
sftp> exit
#####################
# using sshfs command
# zatim nedelat
$ touch test_file.sshfs
## zjistit mountpoint!
$ sshfs -o IdentityFile=/home/local/.ssh/id_rsa dd-16-12-13@salomon.it4i.cz:. /home/training/dd-16-12-13
#####################
# login to the Salomon cluster and check all transfered files
ssh -i /home/local/.ssh/id_rsa dd-16-12-13@salomon.it4i.cz
$ls -l
# yes, all files are stored to home directory on the cluster
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment