On 16.02.2011 09:32, Forrest Xia wrote: > Current karaf sshd feature allow user to login karaf shell via ssh client, > but it requires password to authenticate? Is there a way to make the feature > like popular ssh server that authentication is via ssh certificate file, no > password prompt?
I don't know karaf, but if I understand your question correctly, karaf provides a ssh server that only supports password authentication but you want to login in a non-interactive way. It is possible to do non-interactive ssh password logins with a tool called sshpass. In ubuntu the package is also calles sshpass. From man page: sshpass is a utility designed for running ssh using the mode referred to as "keyboard-interactive" password authentication, but in non-interactive mode. ssh uses direct TTY access to make sure that the password is indeed issued by an interactive keyboard user. Sshpass runs ssh in a dedicated tty, fooling it into thinking it is getting the password from an interactive user. This is what you want, isn't it? You can provide the password to sshpass via a file, stdin or just on the command line. Daniel
signature.asc
Description: OpenPGP digital signature

