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.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Article Feedback - scp tricks
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 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  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 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

phorum.org