en:navody:ssh:start

This is an old revision of the document!


Work on the server via ssh

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).

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 support(at)cesnet.cz. The shell is generally designed only for manipulation with data but not for calculations etc.

Server supports client connection only via ssh protocol ver. 2, which is usually default option. In 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”.

Example of command for connect to the server:

~$ ssh username@server

Example of command for connect to the server with forcing SSH version 2 protocol:

~$ ssh -2 username@server
Default umask is 022 while using SSH.

dm* commands

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.

Command dmput moves the file to the offline medium:

~$ dmput MB4_dul.dat

Command dmput moves the file from the offline medium and at same time removes the file from the online medium:

~$ dmput -r MB4_ofl.dat

Command dmget moves the file from offline medium back to the online medium:

~$ dmget MB4_dul.dat

Example of listing the directory via dmls command:

~$ dmls -l
-rw-------  1 user    storage        4194304 2012-06-22 14:17 (DUL) MB4_dul.dat
-rw-------  1 user    storage        4194304 2012-10-26 02:03 (OFL) MB4_ofl.dat
-rw-------  1 user    storage        4194304 2012-10-26 02:02 (REG) MB4_reg.dat

The file status values listed via dmls command are: Hodnoty stavu souboru vypisované příkazem dmls:

  • REG … File not managed by DMF (it is only on online medium)
  • MIG … Migrating file (file is migrating to offline medium)
  • ARC … Archiving
  • DUL … Dual-state file (on online and offline medium)
  • OFL … Offline file (only offline medium)
  • UNM … Unmigrating file (file is migrating back to online medium)
  • NMG … Nonmigratable file
  • PAR … Partial-state file (file is partly migrated)
  • 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 … DMF cannot determine the file's state

The example of gaining the file list in OFL state from the subdirectory tree folder and their migration (from offline media) back to HDD::

~$ dmfind folder -state OFL -exec dmget '{}' \;


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)

~$ dmfind . \( -state REG -o -state DUL \) -type f -size +100 -exec dmput -r '{}' \;

Manual pages of the commands:


Executing the commands via Putty tool

Executing the command is in Putty defined in the “Connection→SSH” category, where we can insert required command into the line “Remote command”. After the command execution is the connection automatically terminated, which 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.

Putty usage is beneficial especially for simple command running. Putty 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 CygWin application - rsync client installation for command line in the Windows/Cygwin.


Midnight Commander (MC) contain module for “File transfer over shell filesystem” (FISH), it concerns the technology, which does not use SFTP protocol, but it requires the possibility to send general commands via SSH terminal access.
At the CESNET Data Storage is from the reason of security issues allowed to insert only 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.
Last modified:: 10.11.2017 11:16