BackupPC-users

Re: [BackupPC-users] ssh-keygen on Ubuntu 14.04

2014-11-12 18:12:54
Subject: Re: [BackupPC-users] ssh-keygen on Ubuntu 14.04
From: Les Mikesell <lesmikesell AT gmail DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 12 Nov 2014 17:11:36 -0600
On Wed, Nov 12, 2014 at 4:46 PM, Tom Fallon <tom.r.fallon AT gmail DOT com> 
wrote:
> Hi all
>
> on an Ubuntu 14.04 server I've installed backuppc afresh, moved
> /var/lib/backuppc to /mnt/raid (a raid1 soft raid setup) and am in the
> process of configuring the last steps.
>
> Web access is fine and I can add hosts etc but I've reached a stumbling
> block with the ssh-key setup. Following the backuppc install notes on
> the site I do:
>
> su - backuppc
>
> and would then expect to follow the prompts after doing ssh-keygen
> (which I've done successfully on another box, albeit on 12.04). However,
> I hit a snag with this:
>
> No directory, logging in with HOME=/

Is this installed from a package?  Normally that would create the user
with the right home directory for you.   Does the /etc/passwd file
show a home directory?    Or did it someone get lost in your move to
/mnt/raid?  Basically the home field in /etc/passwd for the backuppc
user needs to exist, and that's where the .ssh directory should be.

>
> And then run ssh-keygen -t rsa which completes with no error and an ls
> /var/lib/backuppc/.ssh/ shows the 2 files id_rsa an id.rsa.pub there
>
> If it then try and copy the file from backuppc to my target client with
>
> $ ssh-copy-id -i /var/lib/backuppc/.ssh/id_rsa.pub root@remoteserver
>
> I get this (this is sending to a Mac 10.5 server in case thats relevant)
>
> mktemp: failed to create file via template
> ‘//.ssh/ssh-copy-id_id.XXXXXXXXXX’: No such file or directory
> mktemp failed

Don't know much about ssh'ing into macs as root.   There is probably
something weird about it.  I think it should be doing a mkdir ~/.ssh
there (where ~ is expected to expand to the home directory for the
user (root).  But you can look at the ubuntu version of the
ssh-copy-id script to see.

> I suspect I'm making this more complicated and difficult than it really
> needs to be. And perhaps a simple tweak right at the outset to sort my
> lack of home directory on backuppc user or similar may be the solution.

I normally mount my storage volume at /var/lib/backuppc before
installing the package so anything the installer wants to do happens
in the right place, but I'm not sure if that is appropriate for
ubuntu.

-- 
   Les Mikesell
      lesmikesell AT gmail DOT com

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
<Prev in Thread] Current Thread [Next in Thread>