The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
Article Feedback - scp tricks
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Couple of tricks
Author: Richard Caley 
Date:   08-03-03 10:22

If you are running a copy in the background or from a demon, us ethe options

-o 'BatchMode=yes'

which will make sure it won't try and prompt. A copy which needs a human response will just fail.

If you are using ssh-agent then rather than running it from each login and relying on inheretence of environment variables to pass the location of the agent around, put the output of ssh-agent into a file

ssh-agent -s > "$agent_file"

And then in your .bashrc, or wherever, load the settings
. "$agent_file"

This way all your shells will have access to the agent, including for instance if you connect in from a windows box. Also your scripts can source the same file and have access to keys in the agent.

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 Couple of tricks   new
Richard Caley 08-03-03 10:22 

 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum