en:navody:ssh:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:navody:ssh:start [09.08.2016 17:42]
danecek@cesnet.cz
en:navody:ssh:start [09.08.2016 18:44]
danecek@cesnet.cz
Line 3: Line 3:
 ====== Work on the server via ssh ====== ​ ====== Work on the server via ssh ====== ​
  
-Na server je možné se přihlásit i přes protokol ssh, uživatel dostane příkazovou řádku (bash), případně může zadat příkaz jako parametr (ten se pak vykoná a spojení se ukončí). +It also possible to connect to the server via ssh protocol ​using command line (bash), ​eventually it is possible to insert the command as a parameter (it is then executed ​and the connection ​is terminated).
-On the server ​you can log in via SSH protocol ​and you will ges the command line (bash), ​or you can execute ​command as a parameter (it executes command ​and terminate ​connection).+
  
-Dostupné příkazy najdete v adresáři ''/​usr/​bin''​. Je také možno používat standardní vlastnosti shellu bash, jako například spojení příkazů trubkou. Pokud potřebujete doinstalovat něco dalšího, kontaktujte uživatelskou podporu [[du-support@cesnet.cz|du-support(zavináč)cesnet.cz]]. Obecně platí, že shell na úložišti je určen pouze k manipulaci s daty, nikoli např. výpočtům. +Available commands are provided in the ''/​usr/​bin'' ​directory. It is also possible to use standard bash shell tools, such as pipe command. If you need to install something else please ​contact customer support [[du-support@cesnet.cz|du-support(at)cesnet.cz]]. The shell is generally ​designed only for manipulation with data but not for calculations ​etc.
-Available commands are provided in the ''/​usr/​bin''​. It is also possible to use standard bash shell tools, such as pipe command. If you need to install something elsecontact customer support [[du-support@cesnet.cz|du-support(zavináč)cesnet.cz]]. The shell is designed only for manipulation with data but not for calculations.+
  
-Server ​podporuje připojení klienta pouze přes protokol ​ssh ve verzi 2, která je u klientu většinou defaultní volbouPokud by měl klient nastavenu defaultní verzi ssh-protokolu nastavenu na 1, je nutné ji ručně předefinovat - u konzolového ssh se dá použít parametr ​"​-2", ​Putty se nastaví ​"​Preferred SSH protocol version" ​na hodnotu ​"​2", ​případně ​"2 only"​. ​+Server ​supports client connection only via ssh protocol ver. 2, which is usually default optionIn case that the client has default setup version at ssh protocol version ​1, it is necessary manually redefine. In command line is possible to use parameter ​"​-2", ​in Putty is necessary to set "​Preferred SSH protocol version" ​to the value "​2", ​eventually ​"2 only".
  
 {{page>​[:​en:​adresy]#​[FTP/​FTPS,​ rsync, SCP/SFTP, SSH]&​nofooter&​noheader}} {{page>​[:​en:​adresy]#​[FTP/​FTPS,​ rsync, SCP/SFTP, SSH]&​nofooter&​noheader}}
Line 25: Line 23:
 <note tip>​Default umask is 022 while using SSH.</​note>​ <note tip>​Default umask is 022 while using SSH.</​note>​
 ==== dm* commands ==== ==== dm* commands ====
-Commands dm* are+Commands dm* are for working with files between online (file immediately accessible) and offline (high capacity medium for data, to which is accessed time to time). Command dmls writes out the file state (location), dmput moves the file from online medium to the offline. Command dmget moves the file from offline medium to the online medium.
  
-Příkazy dm* jsou pro práci se soubory mezi online (soubor okamžitě přístupný) a offline medii (vysokokapacitní medium pro data, ke kterým se přistupuje pouze výjimečně). Příkaz dmls vypíše stav (umístění) souboru, dmput přesune soubor z online média na médium offline a dmget jej z offline média přenese do média online. +Command ''​**dmput**'' ​moves the file to the offline ​medium:
- +
-dm * commands are working with files between online (file immediately accessible) and offline media (high capacity media for data which is accessed only rarely). ​Command ​dmls displays the state of file location of the file dmput moving files from online media to offline media and dmget it from offline media to online media transfers. +
- +
-Příkaz ​''​**dmput**'' ​odesílá soubor na offline ​médium:+
 <​code>​ <​code>​
 ~$ dmput MB4_dul.dat ~$ dmput MB4_dul.dat
 </​code>​ </​code>​
  
-Příkaz ​''​**dmput**'' ​odesílá soubor na offline ​médium a zároveň soubor odstraní z online ​média:+Command ​''​**dmput**'' ​moves the file from the offline ​medium and at same time removes the file from the online ​medium:
 <​code>​ <​code>​
 ~$ dmput -r MB4_ofl.dat ~$ dmput -r MB4_ofl.dat
 </​code>​ </​code>​
  
-Zpětné kopírování souboru z offline média na online médium příkazem ​''​**dmget**'':​+Command ​''​**dmget**'' ​moves the file from offline medium back to the online medium:
 <​code>​ <​code>​
 ~$ dmget MB4_dul.dat ~$ dmget MB4_dul.dat
 </​code>​ </​code>​
  
-Příklad výpisu adresáře příkazem ​''​**dmls**'':​+Example of listing the directory via ''​**dmls**'' ​command:
 <​code>​ <​code>​
 ~$ dmls -l ~$ dmls -l
Line 54: Line 48:
 </​code>​ </​code>​
  
 +The file status values listed via ''​**dmls**''​ command are:
 Hodnoty stavu souboru vypisované příkazem ''​**dmls**'':​ Hodnoty stavu souboru vypisované příkazem ''​**dmls**'':​
-  * REG  ...  ​soubor není spravován systémem ​DMF (je pouze na online ​médiu+  * REG  ...  ​File not managed by DMF (it is only on online ​medium
-  * MIG  ...  ​soubor je právě migrován na offline ​médium +  * MIG  ...  ​Migrating file (file is migrating to offline ​medium) 
-  * ARC  ...  ​soubor je právě archivován +  * ARC  ...  ​Archiving 
-  * DUL  ...  ​soubor je v duálním stavu (na online ​offline ​médiu+  * DUL  ...  ​Dual-state file (on online ​and offline ​medium
-  * OFL  ...  ​soubor je pouze na offline ​médiu +  * OFL  ...  ​Offline file (only offline ​medium) 
-  * UNM  ...  ​soubor je právě migrován zpět na online ​médium +  * UNM  ...  ​Unmigrating file (file is migrating back to online ​medium) 
-  * NMG  ...  ​nemigrovatelný soubor +  * NMG  ...  ​Nonmigratable file 
-  * PAR  ...  ​soubor částečně migrován +  * PAR  ...  ​Partial-state file (file is partly migrated) 
-  * N/A  ...  ​u souboru se nepodařilo zjistit ​DMF stav +  * N/A  ...  DMF cannot determine the file's state. This may be because the file is not in a DMF-managed filesystem or because an error occurred when attempting to retrieve the file's state. 
-  * INV  ...  ​soubor je v konfliktním/​nevalidním stavu+  * INV  ...  ​DMF cannot determine the file's state
  
-Příklad získání seznamu souborů ve stavu OFL z podstromu složky ​''​adresar'' ​jejich migrace ​(offline ​médiazpět na HDD:+The example of gaining the file list in OFL state from the subdirectory tree ''​folder'' ​and their migration ​(from offline ​mediaback to HDD::
 <​code>​ <​code>​
-~$ dmfind ​adresar ​-state OFL -exec dmget '​{}'​ \;+~$ dmfind ​folder ​-state OFL -exec dmget '​{}'​ \;
 </​code>​ </​code>​
 \\ \\
  
-Příklad získání souborů ve stavu REG DUL z aktuálního adresáře a jejich migrace na offline ​média ​(zároveň budou odstraněny z online ​médií):+The example of gaining files in REG and DUL state from current directory and their migration to the offline ​medium ​(and they will be removed in the same time from online ​medium)
 <​code>​ <​code>​
 ~$ dmfind . \( -state REG -o -state DUL \) -type f -size +100 -exec dmput -r '​{}'​ \; ~$ dmfind . \( -state REG -o -state DUL \) -type f -size +100 -exec dmput -r '​{}'​ \;
 </​code>​ </​code>​
  
-Manuálové stránky příkazů (v angličtině):+Manual pages of the commands:
   * [[:​en:​navody:​ssh:​dmls|dmls]]   * [[:​en:​navody:​ssh:​dmls|dmls]]
   * [[:​en:​navody:​ssh:​dmput|dmput]]   * [[:​en:​navody:​ssh:​dmput|dmput]]
Line 84: Line 79:
 \\ \\
 ---- ----
-\\ 
- 
  
-==== Spouštění příkazů pomocí nástroje ​Putty ====+==== Executing the commands via Putty tool ====
  
 {{anchor:​putty:​}} {{anchor:​putty:​}}
  
-Spuštění příkazu se v Putty definuje v kategorii ​"​Connection->​SSH", ​kde do řádku ​"​Remote command" ​napíšeme požadovaný příkaz.  +Executing the command is in Putty defined in the "​Connection->​SSH" ​categorywhere we can insert required command into the row "​Remote command"​. 
-Po provedení příkazu se spojení automaticky ukončícož při defaultním nastavení Putty způsobí zavření okna a ztracení zobrazeného výstupu. Aby bylo možné výstup přečístje nutné v kategorii ​Session ​vybrat ​"Close window on exit" ​na "Never".+After the command execution is the connection automatically terminatedwhich will cause (default settings)that the window is closed and the displayed output is lost. It is necessary to select in the Session ​category ​"Close window on exit" ​to "Never, to make possible to read the output.
  
-Použití ​Putty je vhodné především pro jednorázové zadání příkazů, protože nemá historii příkazů a pro každý se musí zadávat příkaz znovuPři častějším přihlašování na server ​přes ssh je v systému ​Windows ​vhodnější použít program ​<​nowiki>​CygWin</​nowiki>​ - [[:cs:​navody:​rsync:​cygwininstalace]].+Putty usage is beneficial especially for simple command runningPutty does not have command history and it is always necessary to insert the command again. If you log in often to the server ​via ssh, it is better to use in Windows ​system ​<​nowiki>​CygWin</​nowiki> ​application ​- [[:en:​navody:​rsync:​cygwininstalace]].
  
 {{:​cs:​navody:​ssh:​01-sessions.png?​500 |}} {{:​cs:​navody:​ssh:​01-sessions.png?​500 |}}
Line 104: Line 97:
 {{:​cs:​navody:​ssh:​03-connection-ssh.png?​500 |}} {{:​cs:​navody:​ssh:​03-connection-ssh.png?​500 |}}
  
-<​note>​Midnight Commander (MC) contains ​module for "File transfer over shell filesystem"​ (FISH). This is technology which doesn'​t ​use SFTP protocol but requires ​option for sending commands to the server over SSH connection. \\ +<​note>​Midnight Commander (MC) contain ​module for "File transfer over shell filesystem"​ (FISH), it concerns the technologywhich does not use SFTP protocolbut it requires the possibility to send general commands via SSH terminal access. 
- +\\ 
-Data storage ​CESNET ​permits ​from safety reasons ​only enter [[:cs:​navody:​ssh:​start|omezenou sadu příkazů]] via SSH. Therefore ​the FISH technology **can not be used**. We recommended ​SSHFS instead.</​note>​+At the CESNET ​Data Storage is from the reason of security issues allowed to insert ​only [[:en:​navody:​ssh:​start|limited set of commands]] and the FISH technology ​is thus **not available** - we recommend to use SSHFS as more universal substitution,​ it provides an access to the files not only for MC, but also for another application as well.</​note>​
Last modified:: 03.03.2020 15:34