[nycbug-talk] scp as a different user

Ray Lai nycbug at cyth.net
Thu May 4 13:03:12 EDT 2006

On Thu, May 04, 2006 at 09:56:35AM -0700, Steve Rieger wrote:
> question
> as "user_a"  i run a script that creates "file", then i need to scp  
> file user_b at localhost user_b at remot-host:~/
> i copied the public keys for user_b from local to remote, but since i  
> am user_a i need to enter the password for user_b when running the  
> scp command, is there any way around that.
> (note i cant give out the keys to user_a)

As user_a, create "file.new", then "mv file.new file".

As user_b, periodically check for "file", and if it exists scp
"file" to remote host.

As user_b, delete "file".


More information about the talk mailing list