Backup guest VM running Ubuntu

Availability for the Always-On Enterprise

Backup guest VM running Ubuntu

Veeam Logoby xmzmc » Fri Feb 10, 2017 11:09 am

Hi,

I'm evaluating Veeam Backup and Replication with a trial license which I got from the Veeam sales team.

I'm trying to backup a guest VM which runs Ubuntu 16.xx on a ESXi 6.x server but whenever I test the connection when creating the backup job, it fails with "Checking Linux credentials Error: Permission denied (publickey)". I don't really understand why this happens but I'm gonna list every step I took on the Ubuntu box and my backupserver in hope someone can spot what I did wrong. (Note: I'm no Linux pro nor Veeam pro, I picked some commands and routines from resources on the web).

Ubuntu:
-Created a user for the backup process: sudo adduser -home /var/lib/veeam -C "Veeam backup" -u 90 veeam
-Added created user to sudoers file: sudo visudo
-Sudoers file now has the following lines:
Code: Select all
                                                    # User privilege specification
                                                    root    ALL=(ALL:ALL) ALL
                                                    veeam ALL=NOPASSWD: ALL

-Swapped to the user: su veeam
-Created .ssh folder: cd /var/lib/veeam, mkdir .ssh, chown 700 .ssh
-Go to .ssh: cd .ssh
-Generated rsa keys and entered a passphrase for the key: ssh-keygen -t rsa
-Added the public key to the authorized_keys file: cp id_rsa.pub authorized_keys

Windows Server 2012 - This is our backup server, we don't use the backup proxy.
-Attempt to create backup jobup
-Defined user account for the backup job, which is: veeam
-Succesfully Imported the private key file which was generated on the Ubuntu box. Passphrase for the key file works.
-Checked the box 'Elevate specified account to root'.
-Tested the credentials and connection which fails with: "Checking Linux credentials Error: Permission denied (publickey)".

Notes:
-I can SSH into the Ubuntu box with the created veeam account. So network connectivity is OK and the account works.
-I'm planning to do passwd -l veeam in the near future but for now, I haven't done it.

Can anyone tell me what I'm doing wrong? I went through the Evaluator's Guides for VMware and I got the backup jobs for our Windows servers up and running pretty fast, but I can't seem to get the job for the Linux box to work. I know Ubuntu doesn't have a root account enabled by default (you have to sudo everything) so maybe that's the problem?
xmzmc
Novice
 
Posts: 4
Liked: never
Joined: Fri Feb 10, 2017 10:07 am

Re: Backup guest VM running Ubuntu

Veeam Logoby xmzmc » Fri Feb 10, 2017 12:17 pm

edit:
I can SSH into the Ubuntu box with the created veeam account. So network connectivity is OK and the account works.

That is, with user/pass it works succesfully. If I try to connect with our private key with Putty it fails at "Server refused our key" (I converted the private Ubuntu generated key into a Putty key and imported it into Putty > Connection > SSH > Auth).
xmzmc
Novice
 
Posts: 4
Liked: never
Joined: Fri Feb 10, 2017 10:07 am

Re: Backup guest VM running Ubuntu

Veeam Logoby vmniels » Fri Feb 10, 2017 1:16 pm 1 person likes this post

You need to generate a key on the Veeam server and add the public key u get from that on the Ubuntu server in the authorized_keys file.

Have a look at https://helpcenter.veeam.com/docs/backu ... tml?ver=95 for more information on how to do this.

Afterwards you'll be able to login from the windows server to the linux server.
VCP-DCV
Veeam Certified Engineer
http://foonet.be
vmniels
Veeam Software
 
Posts: 1475
Liked: 322 times
Joined: Mon Jul 15, 2013 11:09 am
Full Name: Niels Engelen

Re: Backup guest VM running Ubuntu

Veeam Logoby xmzmc » Fri Feb 10, 2017 4:01 pm

Looks like I wasn't setting up the pub/priv key mechanism correctly at all. After your suggestion I only had to do some chmod and chown and after that it worked. Thanks alot!
xmzmc
Novice
 
Posts: 4
Liked: never
Joined: Fri Feb 10, 2017 10:07 am


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: thosa and 12 guests