Host key verification failure: Trying to launch ssh

194 views
Skip to first unread message

Gupta

unread,
Jun 25, 2013, 1:17:40 AM6/25/13
to jenkins...@googlegroups.com
Hi,

I am trying to launch a simple ssh command via jenkins from a Windows machine to a Linux machine but getting the below error:

c:\jenkins\workspace\x86_Linux_SmoketestB>ssh ro...@192.168.x.x "ls -l /usr/local/SWAT" 
Host key verification failed.

c:\jenkins\workspace\x86_Linux_SmoketestB>exit 255 
Build step 'Execute Windows batch command' marked build as failure
Sending e-mails to: q...@xyz.com
ERROR: 250 ok:  Message 558596742 accepted

com.sun.mail.smtp.SMTPSendFailedException: 250 ok:  Message 558596742 accepted
;
  nested exception is:
	com.sun.mail.smtp.SMTPAddressFailedException: 550 #5.1.0 Address rejected.

	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1112)
	at javax.mail.Transport.send0(Transport.java:195)
	at javax.mail.Transport.send(Transport.java:124)
	at hudson.tasks.MailSender.execute(MailSender.java:116)
	at hudson.tasks.Mailer.perform(Mailer.java:117)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:820)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:792)
	at hudson.model.Build$BuildExecution.post2(Build.java:183)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:739)
	at hudson.model.Run.execute(Run.java:1592)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:237)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 #5.1.0 Address rejected.

	at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1686)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1098)
	... 13 more
Notifying upstream projects of job completion
Finished: FAILURE

This command works fine manually though. Any suggestions on how to make it work?

Steffen Breitbach

unread,
Jun 25, 2013, 2:08:56 AM6/25/13
to jenkins...@googlegroups.com
Hi Gupta!

On Mon, 2013-06-24 at 22:17 -0700, Gupta wrote:

> c:\jenkins\workspace\x86_Linux_SmoketestB>ssh ro...@192.168.x.x "ls -l /usr/local/SWAT"
> Host key verification failed.

Execute ssh without a parameter and then accept the host key.

Another option would be to use 'ssh -s StrictHostKeyChecking=no
ro...@192.168.x.x "ls -l /usr/local/SWAT"' but I don't think that's what
you want to do.

Regards
Steffen



Reply all
Reply to author
Forward
0 new messages