fr.ifremer.isisfish.util.ssh
Class SSHUserInfo

java.lang.Object
  extended by fr.ifremer.isisfish.util.ssh.SSHUserInfo
All Implemented Interfaces:
com.jcraft.jsch.UIKeyboardInteractive, com.jcraft.jsch.UserInfo

public class SSHUserInfo
extends Object
implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive

Class used to ask used for connection info. Password, passphrase...

Version:
$Revision: 2705 $ Last update : $Date: 2009-10-27 18:50:23 +0100 (mar., 27 oct. 2009) $ By : $Author: chatellier $
Author:
chatellier

Field Summary
protected  String passphrase
          Passphrase.
protected  String passwd
          Password text field.
protected  JPasswordField passwordField
          Password text field.
 
Constructor Summary
SSHUserInfo()
           
 
Method Summary
 String getPassphrase()
           
 String getPasswd()
           
 String getPassword()
           
 String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo)
           
 boolean promptPassphrase(String arg0)
           
 boolean promptPassword(String message)
           
 boolean promptYesNo(String str)
          Call to ask user in remote server key can be trusted.
 void setPassphrase(String passphrase)
           
 void setPasswd(String passwd)
           
 void showMessage(String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

passphrase

protected String passphrase
Passphrase. Static to be stored on multiple connexion.


passwd

protected String passwd
Password text field.


passwordField

protected JPasswordField passwordField
Password text field.

Constructor Detail

SSHUserInfo

public SSHUserInfo()
Method Detail

promptYesNo

public boolean promptYesNo(String str)
Call to ask user in remote server key can be trusted. Here, auto accept.

Specified by:
promptYesNo in interface com.jcraft.jsch.UserInfo

getPassphrase

public String getPassphrase()
Specified by:
getPassphrase in interface com.jcraft.jsch.UserInfo

getPassword

public String getPassword()
Specified by:
getPassword in interface com.jcraft.jsch.UserInfo

getPasswd

public String getPasswd()
Returns:
the passwd

setPasswd

public void setPasswd(String passwd)
Parameters:
passwd - the passwd to set

setPassphrase

public void setPassphrase(String passphrase)
Parameters:
passphrase - the passphrase to set

promptPassphrase

public boolean promptPassphrase(String arg0)
Specified by:
promptPassphrase in interface com.jcraft.jsch.UserInfo

promptPassword

public boolean promptPassword(String message)
Specified by:
promptPassword in interface com.jcraft.jsch.UserInfo

showMessage

public void showMessage(String message)
Specified by:
showMessage in interface com.jcraft.jsch.UserInfo

promptKeyboardInteractive

public String[] promptKeyboardInteractive(String destination,
                                          String name,
                                          String instruction,
                                          String[] prompt,
                                          boolean[] echo)
Specified by:
promptKeyboardInteractive in interface com.jcraft.jsch.UIKeyboardInteractive


Copyright © 1999-2010 CodeLutin. All Rights Reserved.