I'm trying to retrieve a SVN dump over a SSH connection
ssh user@host "sudo -u $repo_owner svnadmin dump $repo_path"
Depending on whether I already used sudo
in the last 15 minutes, I have or not have to enter my password. The problem is when I have to enter my password, it'll show up unmasked in the terminal. Therefore, I tried something like
ssh -t #...
which opens a pseudo terminal. Now, I have the problem that I don't receive a prompt for the password. The script just stops and waits for user input without telling the user that he should enter his password.
Is there a way to determine if a program that was invoked by a script waits for user input? And more important can I write something to the standard output or standard error output before an other program wants to read something from standard input. I mean some sort of hook method that is called before the actual read is done.
-- t6d
use
$repo_owner ALL = NOPASSWD: /the/path/to/svnadmin
in your sudoers file, obviously you will need to change the path and $repo_owner to be valid.you could use key based authorization for the ssh connection and allow
user
to start svnadmin (or a wrapper script) without passwordssh-agent is your answer, once set up properly you won't be using passwords and won't need to re-enter your pass-phrase more than one initial time.