Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

How to use -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null in Net::SCP::Expect

by aneeshk (Initiate)
on Jun 05, 2015 at 11:12 UTC ( [id://1129187]=perlquestion: print w/replies, xml ) Need Help??

aneeshk has asked for the wisdom of the Perl Monks concerning the following question:

How can I pass 'StrictHostKeyChecking=no' and 'UserKnownHostsFile=/dev/null' in Net::SCP::Expect. I know how to use any one like below

my $scpe = Net::SCP::Expect->new( host => $ip, user => "user", passwo +rd => "password", auto_yes => 1, verbose => 0, option => 'StrictHostK +eyChecking=no' );
  • Comment on How to use -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null in Net::SCP::Expect
  • Download Code

Replies are listed 'Best First'.
Re: How to use -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null in Net::SCP::Expect
by Corion (Patriarch) on Jun 05, 2015 at 11:22 UTC

    Google tells me that this is or was a problem with openssh. Maybe this is fixed in later versions.

    Does the same work when using plain scp from the command line?

Re: How to use -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null in Net::SCP::Expect
by salva (Canon) on Jun 05, 2015 at 11:55 UTC
    Doing that is a very bad idea!

      Generally, I would agree with you however there are some scenarios where it makes sense to do so. It isn't ideal but you have to pick your battles.

      Jason L. Froebe

      Tech Blog

        You are right in that sometimes there is no alternative but to just disable host key checking entirely.

        But in my experience, it is common for people to do that without actually knowing they are ditching the protocol security, just as an easy way to get SSH working.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1129187]
Approved by jellisii2
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-25 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found