Transfer backup to Storagebox
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
-
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. 0 -
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. 0 -
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 u301424@u301424.your-storagebox.de u301424@u301424.your-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 0 -
So when you try a connection with "ssh -i /path/to/ssh/key username@IPaddress" that doesn't work? 0 -
Is this correct? ssh -i /root/.ssh/sce01root u301424@u301424.your-storagebox.de 0 -
If "sce01root" is the name of your SSH key, and it is placed in /root, then yes. 0 -
Yes my key name is sce01root [root@core ~]# ssh -i /root/.ssh/sce01root.pub u301424@u301424.your-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 u301424@u301424.your-storagebox.de's password: PTY allocation request failed on channel 0 shell request failed on channel 0 [root@core ~]# 0 -
That looks normal to me except for two things: -you'll want to change the permissions on the key file to 644 -you don't seem to have the key setup correctly on the destination machine or else it wouldn't ask for a password 0 -
This is what happens if i remove .pub from keyfile name [root@core ~]# ssh -i /root/.ssh/sce01root u301424@u301424.your-storagebox.de Enter passphrase for key '/root/.ssh/sce01root': u301424@u301424.your-storagebox.de's password: PTY allocation request failed on channel 0 shell request failed on channel 0 [root@core ~]# 0 -
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. 0 -
Yes my key name is sce01root [root@core ~]# ssh -i /root/.ssh/sce01root.pub u301424@u301424.your-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 u301424@u301424.your-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.pub0 -
Sorry for paste screen shots, this is what i generated 0 -
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]# 0 -
Thanks for that output. With that information, it sounds like you need to contact Hetzner to see why you can't create those directories with your provided user. 0 -
This is my current storagebox config 0 -
Since you're not able to create the directories on the Hetzner side of things you'll need to contact them directly to see what the problem is. 0 -
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. 0 -
name of the key must be id_rsa
So great to hear and thanks for posting so another person might have this problem and can find the solution. ( id_rsa ) must be the name. Nice. Glad you got it working. ;)0 -
Yeah, i ever post the solution to my problems, maybe in the future it could help other! Thanks 0
Please sign in to leave a comment.
Comments
21 comments