Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# 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