Koozali.org: home of the SME Server

/root/.ssh/config custom template

Des Dougan

/root/.ssh/config custom template
« on: August 13, 2002, 02:27:11 AM »
I want to customize the /root/.ssh/config file on my server to add my test server so that I can rsync data from the test box, using ssh, for backup. I want the job to be scheduled, so I need to enable ssh to bypass the password routine for this host.

I'm familiar with the custom templates features, but not PERL. I've created a custom template (30LocalHostsConfig) but when I expand it,  it's not being added.

The template fragment is as follows:

{
Host bertie
    Protocol 1
    UserKnownHostsFile ~/.ssh/known_hosts.e-smith
    StrictHostKeyChecking yes
    BatchMode yes
}

I've also tried without the braces, but with the same results.

Can anyone clarify where I'm going wrong?

Thanks,

Des Dougan

Jon Blakely

Re: /root/.ssh/config custom template
« Reply #1 on: August 13, 2002, 12:55:36 PM »
Des,

Try

{
       $OUT .= <Host bertie
Protocol 1
UserKnownHostsFile ~/.ssh/known_hosts.e-smith
StrictHostKeyChecking yes
BatchMode yes
HERE
}

Jon

Des Dougan

Re: /root/.ssh/config custom template
« Reply #2 on: August 13, 2002, 10:04:06 PM »
Jon,

Thanks for your help. I got it working properly without the braces - I'm ashamed to admit that the original problem was not knowing the difference between _ and - (as in templates-custom). Put it down to fatigue and incipient brain death....

Cheers,

Des