This project is read-only.

disable strict host key checking

Nov 26, 2012 at 5:07 PM

How would I generate a connection similar to one created from cygwin as seen below

ssh -o StrictHostKeyChecking=no -i mypemfile.pem user@111.111.1.11

thanks!

Nov 27, 2012 at 9:18 PM

nevermind, it doesn't seem to need that in order to connect.

also, figured out how to use my PEM file:

 

http://sshnet.codeplex.com/workitem/1407?FocusElement=CommentTextBox

 

nice job devs, great API!

Jun 25, 2013 at 3:57 PM
Hi,

I also need this feature to be able to disable StrictHostKeyChecking in one of my projects. I looked at the source code, but could not find where/how to add this option.

How can I get this working in SSH.NET?

thanks!
Jun 25, 2013 at 4:14 PM
It's your job to check the HostKey.
The default is to accept all HostKeys, so its the behavior you want.

If you want to check HostKeys you have to register to the HostKeyReceived-Event and set e.trust by yourself to false/true.

Just FYI: It's a very bad idea to not check HostKeys ;)