Package org.apache.sshd.client.simple
Interface SimpleSessionClient
-
- All Superinterfaces:
java.lang.AutoCloseable,java.nio.channels.Channel,java.io.Closeable,SimpleClientConfigurator
- All Known Subinterfaces:
SimpleClient
- All Known Implementing Classes:
AbstractSimpleClient,AbstractSimpleClientSessionCreator
public interface SimpleSessionClient extends SimpleClientConfigurator, java.nio.channels.Channel
A simplified synchronous API for creating client sessions
-
-
Field Summary
-
Fields inherited from interface org.apache.sshd.client.simple.SimpleClientConfigurator
DEFAULT_AUTHENTICATION_TIMEOUT, DEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ClientSessionsessionLogin(java.lang.String host, int port, java.lang.String username, java.lang.String password)Creates a session and logs in using the provided credentialsdefault ClientSessionsessionLogin(java.lang.String host, int port, java.lang.String username, java.security.KeyPair identity)Creates a session and logs in using the provided credentialsClientSessionsessionLogin(java.lang.String uri, java.lang.String password)Creates a session and logs in using the provided credentialsdefault ClientSessionsessionLogin(java.lang.String host, java.lang.String username, java.lang.String password)Creates a session on the default port and logs in using the provided credentialsdefault ClientSessionsessionLogin(java.lang.String host, java.lang.String username, java.security.KeyPair identity)Creates a session on the default port and logs in using the provided credentialsClientSessionsessionLogin(java.lang.String uri, java.security.KeyPair identity)Creates a session and logs in using the provided credentialsdefault ClientSessionsessionLogin(java.net.InetAddress host, int port, java.lang.String username, java.lang.String password)Creates a session and logs in using the provided credentialsdefault ClientSessionsessionLogin(java.net.InetAddress host, int port, java.lang.String username, java.security.KeyPair identity)Creates a session and logs in using the provided credentialsdefault ClientSessionsessionLogin(java.net.InetAddress host, java.lang.String username, java.lang.String password)Creates a session on the default port and logs in using the provided credentialsdefault ClientSessionsessionLogin(java.net.InetAddress host, java.lang.String username, java.security.KeyPair identity)Creates a session on the default port and logs in using the provided credentialsClientSessionsessionLogin(java.net.SocketAddress target, java.lang.String username, java.lang.String password)Creates a session and logs in using the provided credentialsClientSessionsessionLogin(java.net.SocketAddress target, java.lang.String username, java.security.KeyPair identity)Creates a session and logs in using the provided credentials-
Methods inherited from interface org.apache.sshd.client.simple.SimpleClientConfigurator
getAuthenticationTimeout, getConnectTimeout, setAuthenticationTimeout, setConnectTimeout
-
-
-
-
Method Detail
-
sessionLogin
default ClientSession sessionLogin(java.lang.String host, java.lang.String username, java.lang.String password) throws java.io.IOException
Creates a session on the default port and logs in using the provided credentials- Parameters:
host- The target host name or addressusername- Usernamepassword- Password- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
default ClientSession sessionLogin(java.lang.String host, int port, java.lang.String username, java.lang.String password) throws java.io.IOException
Creates a session and logs in using the provided credentials- Parameters:
host- The target host name or addressport- The target portusername- Usernamepassword- Password- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
default ClientSession sessionLogin(java.lang.String host, java.lang.String username, java.security.KeyPair identity) throws java.io.IOException
Creates a session on the default port and logs in using the provided credentials- Parameters:
host- The target host name or addressusername- Usernameidentity- TheKeyPairidentity- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
default ClientSession sessionLogin(java.lang.String host, int port, java.lang.String username, java.security.KeyPair identity) throws java.io.IOException
Creates a session and logs in using the provided credentials- Parameters:
host- The target host name or addressport- The target portusername- Usernameidentity- TheKeyPairidentity- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
default ClientSession sessionLogin(java.net.InetAddress host, java.lang.String username, java.lang.String password) throws java.io.IOException
Creates a session on the default port and logs in using the provided credentials- Parameters:
host- The target hostInetAddressusername- Usernamepassword- Password- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
default ClientSession sessionLogin(java.net.InetAddress host, int port, java.lang.String username, java.lang.String password) throws java.io.IOException
Creates a session and logs in using the provided credentials- Parameters:
host- The target hostInetAddressport- The target portusername- Usernamepassword- Password- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
default ClientSession sessionLogin(java.net.InetAddress host, java.lang.String username, java.security.KeyPair identity) throws java.io.IOException
Creates a session on the default port and logs in using the provided credentials- Parameters:
host- The target hostInetAddressusername- Usernameidentity- TheKeyPairidentity- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
default ClientSession sessionLogin(java.net.InetAddress host, int port, java.lang.String username, java.security.KeyPair identity) throws java.io.IOException
Creates a session and logs in using the provided credentials- Parameters:
host- The target hostInetAddressport- The target portusername- Usernameidentity- TheKeyPairidentity- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
ClientSession sessionLogin(java.net.SocketAddress target, java.lang.String username, java.lang.String password) throws java.io.IOException
Creates a session and logs in using the provided credentials- Parameters:
target- The targetSocketAddressusername- Usernamepassword- Password- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
ClientSession sessionLogin(java.net.SocketAddress target, java.lang.String username, java.security.KeyPair identity) throws java.io.IOException
Creates a session and logs in using the provided credentials- Parameters:
target- The targetSocketAddressusername- Usernameidentity- TheKeyPairidentity- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
ClientSession sessionLogin(java.lang.String uri, java.lang.String password) throws java.io.IOException
Creates a session and logs in using the provided credentials- Parameters:
uri- The target uripassword- Password- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
sessionLogin
ClientSession sessionLogin(java.lang.String uri, java.security.KeyPair identity) throws java.io.IOException
Creates a session and logs in using the provided credentials- Parameters:
uri- The target uriidentity- TheKeyPairidentity- Returns:
- Created
ClientSession - Throws:
java.io.IOException- If failed to login or authenticate
-
-