in reply to known_hosts verification disable

Read the StrictHostKeyChecking entry on the ssh configuration man page (ssh_config(5)).

Though, note that changing that setting may impact the security of SSH.

Replies are listed 'Best First'.
Re^2: known_hosts verification disable
by Anonymous Monk on Mar 22, 2011 at 17:07 UTC
    I don't want to change that file as it will effect the settings for all users. Is there any option i can use from perl ssh expect module. While reading thro' Expect.pm module i can see ssh_option as below but i'm not sure how to make use of it for using any ssh options. use fields qw( host user password port no_terminal escape_char ssh_option raw_pty exp_internal exp_debug log_file log_stdout restart_timeout_upon_receive timeout terminator expect debug next_line before match after binary );
      something like...
      ssh_option => '-o StrictHostKeyChecking=no'
      ...should do.
        The option you gave worked... That's my bad I was trying with wrong option. I corrected it now. Thank you very much for your help.
        i added the option and tried a sample code but it's not helping... I'm just trying ls command on remote m/c with sample script. Pls see the below output it's asking for host key verification even after adding the ssh_option you specified... <snip> Running remote cmds Wed Mar 23 11:09:21 IST 2011 output of ls The authenticity of host 'test1 (192.168.1.1)' can't be established. RSA key fingerprint is 48:0b:26:bf:5d:54:c9:c3:cc:7a:25:20:5e:14:b6:d0. Are you sure you want to continue connecting (yes/no)? <snip>
        i added the option and tried a sample code but it's not helping... I'm just trying ls command on remote m/c with sample script. Pls see the below output it's asking for host key verification even after adding the ssh_option you specified...

        <snip>

        Running remote cmds

        Wed Mar 23 11:09:21 IST 2011

        output of ls

        The authenticity of host 'test1 (192.168.1.1)' can't be established. RSA key fingerprint is 48:0b:26:bf:5d:54:c9:c3:cc:7a:25:20:5e:14:b6:d0. Are you sure you want to continue connecting (yes/no)?

        <snip>

        pls help