{"id":14013,"date":"2022-09-23T11:32:21","date_gmt":"2022-09-23T08:32:21","guid":{"rendered":"https:\/\/www.hyyat.com\/?post_type=docs&#038;p=14013"},"modified":"2022-09-23T11:33:09","modified_gmt":"2022-09-23T08:33:09","password":"","slug":"access-with-ssh-rsync-borgbackup","status":"publish","type":"docs","link":"https:\/\/www.hyyat.com\/en\/knowledgebase\/access-with-ssh-rsync-borgbackup\/","title":{"rendered":"Access with SSH\/rsync\/BorgBackup"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\"><\/h1>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"ssh--rsync--borgbackup\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#ssh--rsync--borgbackup\" target=\"_blank\" rel=\"noopener\"><\/a><\/h1>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"ssh--rsync--borgbackup\">SSH \/ rsync \/ BorgBackup<\/h1>\n\n\n\n<p>The Storage Box provides an extended SSH service on port 23. With this service, can you use rsync, BorgBackup and some additional command line tools.<\/p>\n\n\n\n<p>To create an SSH connection on your Storage Box, first activate the SSH support setting for your Storage Box via the Robot administration interface. After that, can you access it via command line:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#383838\"><code>ssh -p23 uXXXXX@uXXXXX.your-storagebox.de<\/code><\/pre>\n\n\n\n<p>It is possible to get interactive SSH access, but this access is limited. It is not possible to have interactive access via port 22, but it is possible via port 23. There is no full shell. For example, it is not possible to use pipes or redirects. It is also not possible to execute uploaded scripts.<\/p>\n\n\n\n<p>You can also directly execute commands via SSH like this:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#383838\"><code>ssh -p23 uXXXXX@uXXXXX.your-storagebox.de mkdir new_directory<\/code><\/pre>\n\n\n\n<p>If you use a sub-account, then please use the username of the sub-account for the SSH connection.<\/p>\n\n\n\n<p>For SSH key authentication, you must save a public SSH key in normal OpenSSH format on your Storage Box. Do not save the key in RFC4716 format. For a more detailed guide, please see\u00a0<a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/storage-box-ssh-keys\/\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">Storage Box SSH Keys<\/mark><\/a>.<\/p>\n\n\n\n<p>Only the directory&nbsp;<code>\/home\/<\/code>&nbsp;is writable on the Storage Box. To address directories or files on the Storage Box, we therefore recommend that you use relative paths. For example, to download the file&nbsp;<code>\/server1\/full_backup.tar.gz<\/code>&nbsp;from the Storage Box, you can use the following file paths:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>server1\/full_backup.tar.gz\n.\/server1\/full_backup.tar.gz<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"borgbackup\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#borgbackup\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"borgbackup\">BorgBackup<\/h2>\n\n\n\n<p>With BorgBackup, you can save encrypted and duplicate backups of your Storage Box. You can find a guide for how to do this at\u00a0<a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/install-and-configure-borgbackup\/\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">BorgBackup<\/mark><\/a>.<\/p>\n\n\n\n<p>The Storage Boxes do use Borg 1.2 as default version. If you want to use an older version, you can do so by specifying the additional argument <code>--remote-path=&lt;borg-version&gt;<\/code>. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>borg init --encryption=repokey --remote-path=borg-1.1 ssh:\/\/uXXXXX@uXXXXX.your-storagebox.de:23\/.\/borg-repository<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"append-only-mode\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#append-only-mode\" target=\"_blank\" rel=\"noopener\"><\/a><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"append-only-mode\">Append Only Mode<\/h3>\n\n\n\n<p>It is possible to use Borg in an append only mode. This mode only allows the creation of new archives, but denies the deletion of old archives. You can find instructions for the configuration on the official <a href=\"https:\/\/borgbackup.readthedocs.io\/en\/stable\/usage\/notes.html#append-only-mode-forbid-compaction\" target=\"_blank\" rel=\"noreferrer noopener\">BorgBackup documentation<\/a>.<\/p>\n\n\n\n<p>Note: A restricted client can still execute archive deletions. The archives will not directly be deleted, but marked as deleted. To delete the archives, you must execute a delete or execute a write operation from an unrestricted client. To restore an archive which is marked as deleted, please follow the <a href=\"https:\/\/borgbackup.readthedocs.io\/en\/stable\/usage\/notes.html#append-only-mode-forbid-compaction\" target=\"_blank\" rel=\"noreferrer noopener\">BorgBackup documentation<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"rsync\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#rsync\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"rsync\">rsync<\/h2>\n\n\n\n<p>You can use rsync to upload the current state of your file directories to your Storage Box. For example, to upload a local directory to the Storage Box, you can use rsync as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>rsync --progress -e 'ssh -p23' --recursive &lt;local_directory&gt; &lt;username&gt;@&lt;username&gt;.your-storagebox.de:&lt;target_directory&gt;<\/code><\/pre>\n\n\n\n<p>To re-download a directory from the Storage Box, you only need to swap the directories:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>rsync --progress -e 'ssh -p23' --recursive &lt;username&gt;@&lt;username&gt;.your-storagebox.de:&lt;remote_directory&gt; &lt;local_directory&gt;<\/code><\/pre>\n\n\n\n<p>To remove files which are already deleted from the source system also from the destination you have to add the <code>--delete<\/code> parameter. Otherwise deleted files remain on the target system and only changes or new files are transferred. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>rsync --progress --delete -e 'ssh -p23' --recursive &lt;local_directory&gt; &lt;username&gt;@&lt;username&gt;.your-storagebox.de:&lt;target_directory&gt;<\/code><\/pre>\n\n\n\n<p>It is not possible to customize the user and group ID of the uploaded files. We also do not recommend backing up your whole server like this. For such tasks, we recommend a backup tool like BorgBackup.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scp\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#scp\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scp\">SCP<\/h2>\n\n\n\n<p>You can also use SCP via port 23. To upload a file via SCP, you can execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>scp -P 23 &lt;local_file&gt; &lt;username&gt;@&lt;username&gt;.your-storagebox.de:&lt;remote_file&gt;<\/code><\/pre>\n\n\n\n<p>To download the file again, you only have to swap the target and source files:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>scp -P 23 &lt;username&gt;@&lt;username&gt;.your-storagebox.de:&lt;remote_file&gt; &lt;local_file&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sftp\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#sftp\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sftp\">SFTP<\/h2>\n\n\n\n<p>Accessing your Storage Box via SFTP is similar to accessing it with an FTP client. To start an SFTP session, please execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>sftp -P 23 &lt;username&gt;@&lt;username&gt;.your-storagebox.de<\/code><\/pre>\n\n\n\n<p>You can then upload files using&nbsp;<code>put<\/code>&nbsp;and download them using&nbsp;<code>get<\/code>. With&nbsp;<code>ls<\/code>,&nbsp;you get a directory listing:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>sftp&gt; put 100MB.file\nUploading 100MB.file to \/home\/100MB.file\n100MB.file                           100%  100MB  78.7MB\/s   00:01\nsftp&gt; ls -ahl\ndrwxr-xr-x    0 12345      12345     16B  Mar 28 10:55 .\ndr-x--x--x    0 0          0         10B  Mar 27 12:16 ..\n-rw-r--r--    0 12345      12345     100M Mar 28 11:34 100MB.file\nsftp&gt; get 100MB.file\nFetching \/home\/100MB.file to 100MB.file\n\/home\/100MB.file                     100%  100MB 110.6MB\/s   00:00\nsftp&gt; quit<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"dd\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#dd\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"dd\">dd<\/h2>\n\n\n\n<p>You can use dd to up- or download data directly to\/from the Storage Box. For example, you can execute the following to create an archive file using Linux and upload it directly to the Storage Box:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>tar -cz &lt;Source-Directory&gt; | ssh -p23 uXXXXX@uXXXXX.your-storagebox.de \"dd of=archive.tar.gz bs=4M\"<\/code><\/pre>\n\n\n\n<p>To download this archive again and extract it execute this:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>ssh -p23 uXXXXX@uXXXXX.your-storagebox.de \"dd if=archive.tar.gz bs=4M\" | tar -xz -C &lt;Target-Directory&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"rclone\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#rclone\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"rclone\">Rclone<\/h2>\n\n\n\n<p>You can use the SFTP backend in Rclone to access the Storage Box. To configure Rclone run the command <code>rclone config<\/code> and follow the assistant.<\/p>\n\n\n\n<p>Alternatively can you also manually configure it. A minimal configuration (default path <code>~\/.config\/rclone\/rclone.conf<\/code>) looks like the following:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>&#91;storagebox]\ntype = sftp\nhost = uXXXXX.your-storagebox.de\nuser = uXXXXX\nport = 23\npass = &lt;obscured-password&gt;<\/code><\/pre>\n\n\n\n<p>To obscure the password execute the command <code>rclone obscure &lt;clear-text-password&gt;<\/code>.<\/p>\n\n\n\n<p>Instead of the password in the <code>pass<\/code> variable can you also specify a SSH key with the configuration variable <code>key_file = &lt;path-to-private-key&gt;<\/code>.<\/p>\n\n\n\n<p>You can then access the Storage Box like the following:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>rclone ls storagebox:<\/code><\/pre>\n\n\n\n<p>Please check the <a href=\"https:\/\/rclone.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Rclone documentation<\/a> for more details.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"restic\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#restic\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"restic\">Restic<\/h2>\n\n\n\n<p>Restic is natively supported with the SFTP backend. Optionally we do support the restic backend which is provided by <a href=\"https:\/\/rclone.org\/commands\/rclone_serve_restic\/\" target=\"_blank\" rel=\"noreferrer noopener\">Rclone<\/a> over SSH.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cpanel-and-jetbackup\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#cpanel-and-jetbackup\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cpanel-and-jetbackup\">Cpanel and JetBackup<\/h2>\n\n\n\n<p>You can find a guide for the configuration <a href=\"https:\/\/docs.jetbackup.com\/v5.1\/adminpanel\/Destinations\/DestinationType\/SSHDestination.html\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ssh-host-keys\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#ssh-host-keys\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ssh-host-keys\">SSH Host Keys<\/h2>\n\n\n\n<p>In order to ensure the authenticity of the connection, you can compare the host keys of the Storage Box with the keys below.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>SHA256:XqONwb1S0zuj5A1CDxpOSuD2hnAArV1A3wKY7Z3sdgM (ED25519)\nSHA256:EMlfI8GsRIfpVkoW1H2u0zYVpFGKkIMKHFZIRkf2ioI (RSA)\nSHA256:RWkLouD9tfTwdboJOzjiWo5njZI59Hcta82ttAWxDA0 (DSA)\nSHA256:oDHZqKXnoMtgvPBjjC57pcuFez28roaEuFcfwyg8O5c (ECDSA)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"available-commands\"><a href=\"https:\/\/docs.hetzner.com\/robot\/storage-box\/access\/access-ssh-rsync-borg#available-commands\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"available-commands\">Available Commands<\/h2>\n\n\n\n<p>You can use the following commands on the Storage Box:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-text-color has-background\" style=\"background-color:#474343\"><code>ls\nstat\ncd\npwd\nmkdir\nrmdir\ntouch\ndu\ndf\ndd\ncp\nrm\nunlink\nmv\nchmod\ncat\ntail\nhead\ngrep\nmd5\nsha1\nsha256\nsha512\nmd5sum\nsha1sum\nsha256sum\nsha512sum<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>SSH \/ rsync \/ BorgBackup The Storage Box provides an extended SSH service on port 23. With this service, can you use rsync, BorgBackup and some additional command line tools. To create an SSH connection on your Storage Box, first activate the SSH support setting for your Storage Box via the Robot administration interface. After [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","inline_featured_image":false,"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","footnotes":""},"doc_category":[2815],"doc_tag":[],"class_list":["post-14013","docs","type-docs","status-publish","hentry","doc_category-storag-box"],"year_month":"2026-04","word_count":1142,"total_views":"4128","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin","author_nicename":"admin","author_url":"https:\/\/www.hyyat.com\/en\/author\/admin\/"},"doc_category_info":[{"term_name":"Storage Box","term_url":"https:\/\/www.hyyat.com\/en\/kb\/storag-box\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/14013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/comments?post=14013"}],"version-history":[{"count":0,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/14013\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media?parent=14013"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_category?post=14013"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_tag?post=14013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}