Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Ant SshExec task throwing JschException : Auth fail

 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

This script was working fine, but stopped working after the remote server was upgraded from Suse 9 to Suse9.1 .
The problem should not be the ssh hosts file, because I can use ssh directly to connect without a problem, and also if I remove that file, ant throws a different exception (something along the lines of Host lookup failed).
I am really stumped that why the authorization is failing when the password is included right there in the script (I know that is not very secure, this is to get it working)

Any help is greatly appreciated!


Following is the stripped down ant script -


And the exception thrown is -

 
Sonny Gill
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So...I happened to find out why this was happening.
The reason the script started to fail must have been a configuration change on the remote system.

Ref - http://sancho-gui.sourceforge.net/faq.phtml


SSH2 NOTE: (might not be required if using 0.9.4-22 or newer and id_dsa)

In order for SSH2 tunneling to function correctly one must ensure that the
following line is uncommented in /etc/ssh/sshd_config :
--------------------------CUT-------------------------------
# Change to yes to enable tunnelled clear text passwords
PasswordAuthentication yes
--------------------------CUT-------------------------------

Otherwise the initiation of the tunnel will fail with
"SSH Initialization failed, try again?
com.jcraft.jsch.JSchException: Auth fail"



Thanks to whoever posted the above faq entry

After editing my remote sshd configuration, I can run the script again.

A discussion of what this setting means can be found here -
http://www.lugod.org/mailinglists/archives/vox-tech/2005-07/msg00012.html

Sonny
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I had also got the error "com.jcraft.jsch.JSchException: Auth fail " while using the ANT task sshexec and I followed the solution given in this forum.

# Change to yes to enable tunnelled clear text passwords
PasswordAuthentication yes

But I still see the same error. Could anyone help?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is more to ssh authentication than simply setting a property. If the remote system uses public/private keys, then how to set that up on your system is much different than if the remote system uses a username/password scheme. So before we can help you, we need to know what kind of authentication is used by the remote system for ssh.
 
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic