Transfer backup to Storagebox

samuelmf

Well-Known Member
May 22, 2006
143
9
168
Perú
Hi guys i have my WHM configured to copy my server backup to other cpanel server as additional destination.
Today i get Hetzner Storagebox service to store my backups there

Someone have experience sending backups to Hetzner Storagebox?, i someone knows a step by step to configure my WHM to send my backups as incremental by rsync there, i would appreciate it.

Thanks in advance
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Hey there! There isn't an official cPanel guide for Hetzner, as this isn't one of our officially-supported remote locations:


If you're able to create an FTP user, I'd expect the FTP backup option to work well:

 

samuelmf

Well-Known Member
May 22, 2006
143
9
168
Perú
Thanks for reply CpRex
Actually i'm connected to my storagebox from whm as an additional destination, by sftp, the whm stored the backup on the storagebox succesfully, but the problem is that i cannot connect by rsync and ssh using ssh keys.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Are you able to connect to the remote destination on the command line as a user with SSH access? That would be the first thing I'd check regarding the rsync and SSH key issues - if it doesn't work directly on the command line as your user, it won't work from the backup tool.
 

samuelmf

Well-Known Member
May 22, 2006
143
9
168
Perú
I'm able to connect by SFTP,
when i try to ssh by Xshell, the server ask for user and then for password, and then it remains on black screen, if i press enter i get the message the server sends a disconnection packet.
Host 'u301424.your-storagebox.de' resolved to 142.132.153.141.
Connecting to 142.132.153.141:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

WARNING! The remote SSH server rejected X11 forwarding request.


If i enter from one of my cpanel servers cli
[root@core ~]# sftp -P23 [email protected]-storagebox.de
[email protected]-storagebox.de's password:
Connected to u301424.your-storagebox.de.
sftp>

I tryed with ssh keys, i already generated the ssh keys on my cpanel server, authorized the public hey, i uploaded it to .ssh folder of my storagebox but seems that i0m doing something wrong
 

samuelmf

Well-Known Member
May 22, 2006
143
9
168
Perú
Yes my key name is sce01root

[root@core ~]# ssh -i /root/.ssh/sce01root.pub [email protected]-storagebox.de
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/root/.ssh/sce01root.pub' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/root/.ssh/sce01root.pub": bad permissions
[email protected]-storagebox.de's password:
PTY allocation request failed on channel 0
shell request failed on channel 0
[root@core ~]#
 

samuelmf

Well-Known Member
May 22, 2006
143
9
168
Perú
This is what happens if i remove .pub from keyfile name

[root@core ~]# ssh -i /root/.ssh/sce01root [email protected]-storagebox.de
Enter passphrase for key '/root/.ssh/sce01root':
[email protected]-storagebox.de's password:
PTY allocation request failed on channel 0
shell request failed on channel 0
[root@core ~]#
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Each key is a pair - you'll have key_name and also key_name.pub. The ".pub" version is the public key, which goes on the remote system you are connecting to. The key_name file is the private key that is kept on your local system.
 

Spirogg

Well-Known Member
Feb 21, 2018
700
163
43
chicago
cPanel Access Level
Root Administrator
Yes my key name is sce01root

[root@core ~]# ssh -i /root/.ssh/sce01root.pub [email protected]-storagebox.de
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/root/.ssh/sce01root.pub' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/root/.ssh/sce01root.pub": bad permissions
[email protected]-storagebox.de's password:
PTY allocation request failed on channel 0
shell request failed on channel 0
[root@core ~]#
try
chmod 400 ~/root/.ssh/sce01root.pub
or
chmod 400 ~/.ssh/sce01root.pub
 

samuelmf

Well-Known Member
May 22, 2006
143
9
168
Perú
Im following this tuto steps Backup Space SSH Keys - Hetzner Docs
[root@core .ssh]# echo -e "mkdir .ssh \n chmod 700 .ssh \n put storagebox_authorized_keys .ssh/authorized_keys \n chmod 600 .ssh/authorized_keys" | sftp
Connected to u301424.your-storagebox.de.
sftp> mkdir .ssh
Couldn't create directory: Failure
sftp> chmod 700 .ssh
Changing mode on /.ssh
sftp> put storagebox_authorized_keys .ssh/authorized_keys
Uploading storagebox_authorized_keys to /.ssh/authorized_keys
storagebox_authorized_keys 100% 382 2.6KB/s 00:00
sftp> chmod 600 .ssh/authorized_keys
Changing mode on /.ssh/authorized_keys
[root@core .ssh]#
 

samuelmf

Well-Known Member
May 22, 2006
143
9
168
Perú
I will share you a video wit the steps please take a look, and Thanks for all your time an patience
 

samuelmf

Well-Known Member
May 22, 2006
143
9
168
Perú
Thanks for all the replys, i have already fixed, the problem was because i was creating the keyname with custom name and the storagebox needs that the name of the key must be id_rsa.
 
  • Like
Reactions: cPRex and Spirogg