Comprehensive data protection for all workloads
Post Reply
xmzmc
Enthusiast
Posts: 28
Liked: 1 time
Joined: Feb 10, 2017 10:07 am
Contact:

Backup guest VM running Ubuntu

Post by xmzmc »

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
Enthusiast
Posts: 28
Liked: 1 time
Joined: Feb 10, 2017 10:07 am
Contact:

Re: Backup guest VM running Ubuntu

Post by xmzmc »

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).
nielsengelen
Product Manager
Posts: 5635
Liked: 1181 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Backup guest VM running Ubuntu

Post by nielsengelen » 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.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
xmzmc
Enthusiast
Posts: 28
Liked: 1 time
Joined: Feb 10, 2017 10:07 am
Contact:

Re: Backup guest VM running Ubuntu

Post by xmzmc »

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!
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 88 guests