Top Description Fields Methods
org.apache.sshd.client.simple

public Interface SimpleSessionClient

extends SimpleClientConfigurator, Channel
Known Direct Subinterfaces
org.apache.sshd.client.simple.SimpleClient
Imports
java.io.IOException, java.net.InetAddress, .InetSocketAddress, .SocketAddress, java.nio.channels.Channel, java.security.KeyPair, java.util.Objects, org.apache.sshd.client.session.ClientSession, org.apache.sshd.common.util.ValidateUtils

A simplified synchronous API for creating client sessions
Author
Apache MINA SSHD Project

Field Summary

Inherited from org.apache.sshd.client.simple.SimpleClientConfigurator:
DEFAULT_AUTHENTICATION_TIMEOUTDEFAULT_CONNECT_TIMEOUTDEFAULT_PORT

Method Summary

Modifier and TypeMethod and Description
public default ClientSession

Returns:

Created ClientSession
sessionLogin
(String
The target host name or address
host
,
String
Username
username
,
String
Password
password
)

Creates a session on the default port and logs in using the provided credentials

public default ClientSession

Returns:

Created ClientSession
sessionLogin
(String
The target host name or address
host
,
int
The target port
port
,
String
Username
username
,
String
Password
password
)

Creates a session and logs in using the provided credentials

public default ClientSession

Returns:

Created ClientSession
sessionLogin
(String
The target host name or address
host
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Creates a session on the default port and logs in using the provided credentials

public default ClientSession

Returns:

Created ClientSession
sessionLogin
(String
The target host name or address
host
,
int
The target port
port
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Creates a session and logs in using the provided credentials

public default ClientSession

Returns:

Created ClientSession
sessionLogin
(InetAddress
The target host InetAddress
host
,
String
Username
username
,
String
Password
password
)

Creates a session on the default port and logs in using the provided credentials

public default ClientSession

Returns:

Created ClientSession
sessionLogin
(InetAddress
The target host InetAddress
host
,
int
The target port
port
,
String
Username
username
,
String
Password
password
)

Creates a session and logs in using the provided credentials

public default ClientSession

Returns:

Created ClientSession
sessionLogin
(InetAddress
The target host InetAddress
host
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Creates a session on the default port and logs in using the provided credentials

public default ClientSession

Returns:

Created ClientSession
sessionLogin
(InetAddress
The target host InetAddress
host
,
int
The target port
port
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Creates a session and logs in using the provided credentials

public ClientSession

Returns:

Created ClientSession
sessionLogin
(SocketAddress
The target SocketAddress
target
,
String
Username
username
,
String
Password
password
)

Creates a session and logs in using the provided credentials

public ClientSession

Returns:

Created ClientSession
sessionLogin
(SocketAddress
The target SocketAddress
target
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Creates a session and logs in using the provided credentials

public ClientSession

Returns:

Created ClientSession
sessionLogin
(String
The target uri
uri
,
String
Password
password
)

Creates a session and logs in using the provided credentials

public ClientSession

Returns:

Created ClientSession
sessionLogin
(String
The target uri
uri
,
KeyPair
The KeyPair identity
identity
)

Creates a session and logs in using the provided credentials

Inherited from java.nio.channels.Channel:
closeisOpen
Inherited from org.apache.sshd.client.simple.SimpleClientConfigurator:
getAuthenticationTimeoutgetConnectTimeoutsetAuthenticationTimeoutsetConnectTimeout

Method Detail

sessionLoginback to summary
public default ClientSession sessionLogin(String host, String username, String password) throws IOException

Creates a session on the default port and logs in using the provided credentials

Parameters
host:String

The target host name or address

username:String

Username

password:String

Password

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public default ClientSession sessionLogin(String host, int port, String username, String password) throws IOException

Creates a session and logs in using the provided credentials

Parameters
host:String

The target host name or address

port:int

The target port

username:String

Username

password:String

Password

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public default ClientSession sessionLogin(String host, String username, KeyPair identity) throws IOException

Creates a session on the default port and logs in using the provided credentials

Parameters
host:String

The target host name or address

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public default ClientSession sessionLogin(String host, int port, String username, KeyPair identity) throws IOException

Creates a session and logs in using the provided credentials

Parameters
host:String

The target host name or address

port:int

The target port

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public default ClientSession sessionLogin(InetAddress host, String username, String password) throws IOException

Creates a session on the default port and logs in using the provided credentials

Parameters
host:InetAddress

The target host InetAddress

username:String

Username

password:String

Password

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public default ClientSession sessionLogin(InetAddress host, int port, String username, String password) throws IOException

Creates a session and logs in using the provided credentials

Parameters
host:InetAddress

The target host InetAddress

port:int

The target port

username:String

Username

password:String

Password

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public default ClientSession sessionLogin(InetAddress host, String username, KeyPair identity) throws IOException

Creates a session on the default port and logs in using the provided credentials

Parameters
host:InetAddress

The target host InetAddress

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public default ClientSession sessionLogin(InetAddress host, int port, String username, KeyPair identity) throws IOException

Creates a session and logs in using the provided credentials

Parameters
host:InetAddress

The target host InetAddress

port:int

The target port

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public ClientSession sessionLogin(SocketAddress target, String username, String password) throws IOException

Creates a session and logs in using the provided credentials

Parameters
target:SocketAddress

The target SocketAddress

username:String

Username

password:String

Password

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public ClientSession sessionLogin(SocketAddress target, String username, KeyPair identity) throws IOException

Creates a session and logs in using the provided credentials

Parameters
target:SocketAddress

The target SocketAddress

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public ClientSession sessionLogin(String uri, String password) throws IOException

Creates a session and logs in using the provided credentials

Parameters
uri:String

The target uri

password:String

Password

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public ClientSession sessionLogin(String uri, KeyPair identity) throws IOException

Creates a session and logs in using the provided credentials

Parameters
uri:String

The target uri

identity:KeyPair

The KeyPair identity

Returns:ClientSession

Created ClientSession

Exceptions
IOException:
If failed to login or authenticate