{
    return "# rdiff-backup: EnableRemote is no"
        if (${'rdiff-backup'}{EnableRemote} ne 'yes');

    my $host = ${'rdiff-backup'}{RemoteHost} || 'localhost';
    my $port = ${'rdiff-backup'}{RemotePort} || 22;
    my $user = ${'rdiff-backup'}{RemoteUser} || 'rdiff-backup';

    return "# rdiff-backup: RemoteHost is localhost" 
        if ($host eq 'localhost');

    my $identity = ${'rdiff-backup'}{RemoteIdentity} || undef;

    return "# rdiff-backup: No RemoteIdentity for $host" 
        if (!$identity);

    $OUT =<<"END_OF_HERE";

Host    rdiff-backup-$host
        Hostname $host
        User $user
        Port $port
        IdentityFile $identity
        StrictHostKeyChecking no

END_OF_HERE
}
