help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remote backup using GNU tar doesn't work


From: Colin S. Miller
Subject: Re: Remote backup using GNU tar doesn't work
Date: Sat, 08 Apr 2006 10:15:11 +0100
User-agent: Debian Thunderbird 1.0.2 (X11/20051002)

Saurabh Barve wrote:
Hi,

I'm trying to do a remote backup of system to a tape drive connected to another system. I have set up public key authentication between the systems, so that I can log in as root without passwords. The setup is like this:


Tape Drive----System A<----->System B

I want to write data from System B on to tape in the tape drive connected to System A.
To test the connection, I do:

[System A]# ssh System B tar -b 512 --rsh-command=/usr/bin/ssh -tvf System A:/dev/nst0

However, this gives me an error:

---
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-with-mic,password).
tar: SystemA\:/dev/nst0: Cannot open: Input/output error
tar: Error is not recoverable: exiting now
---

Allocating a pseudo-TTY helps in getting the remote tar command to work. But I'm prompted to enter my key passphrase:

---
[System A]# ssh -t System B tar -b 512 --rsh-command=/usr/bin/ssh -tvf System A:/dev/nst0

Enter passphrase for key '/root/.ssh/id_rsa':
---

However, I want this to be non-interactive. I can run the tar command locally on System B and it works fine. I am running tar-1.15 on both machines. On System A, I'm running OpenSSH 4.2p1, and on System B I'm running OpenSSH 3.6.1p2

Is there a way to do what I want?

Thanks,
Saurabh

It looks like you have set up a ssh keypair (ssh-keygen).
If you set the key's password to the empty string,
you won't be prompted for a password.

If this is too much for a security risk, you can set up a
'tar' user on the remote machine, and use sudo to run tar.
You then set up a passwordless keypair for the 'tar' user.


HTH,
Colin S. Miller





--
Replace the obvious in my email address with the first three letters of the 
hostname to reply.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]