Package org.apache.sshd.client.simple
Interface SimpleSessionClient
- All Superinterfaces:
AutoCloseable
,Channel
,Closeable
,SimpleClientConfigurator
- All Known Subinterfaces:
SimpleClient
- All Known Implementing Classes:
AbstractSimpleClient
,AbstractSimpleClientSessionCreator
A simplified synchronous API for creating client sessions
- Author:
- Apache MINA SSHD Project
-
Field Summary
Fields inherited from interface org.apache.sshd.client.simple.SimpleClientConfigurator
DEFAULT_AUTHENTICATION_TIMEOUT, DEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT
-
Method Summary
Modifier and TypeMethodDescriptiondefault ClientSession
sessionLogin
(String host, int port, String username, String password) Creates a session and logs in using the provided credentialsdefault ClientSession
sessionLogin
(String host, int port, String username, KeyPair identity) Creates a session and logs in using the provided credentialssessionLogin
(String uri, String password) Creates a session and logs in using the provided credentialsdefault ClientSession
sessionLogin
(String host, String username, String password) Creates a session on the default port and logs in using the provided credentialsdefault ClientSession
sessionLogin
(String host, String username, KeyPair identity) Creates a session on the default port and logs in using the provided credentialssessionLogin
(String uri, KeyPair identity) Creates a session and logs in using the provided credentialsdefault ClientSession
sessionLogin
(InetAddress host, int port, String username, String password) Creates a session and logs in using the provided credentialsdefault ClientSession
sessionLogin
(InetAddress host, int port, String username, KeyPair identity) Creates a session and logs in using the provided credentialsdefault ClientSession
sessionLogin
(InetAddress host, String username, String password) Creates a session on the default port and logs in using the provided credentialsdefault ClientSession
sessionLogin
(InetAddress host, String username, KeyPair identity) Creates a session on the default port and logs in using the provided credentialssessionLogin
(SocketAddress target, String username, String password) Creates a session and logs in using the provided credentialssessionLogin
(SocketAddress target, String username, KeyPair identity) Creates a session and logs in using the provided credentialsMethods inherited from interface org.apache.sshd.client.simple.SimpleClientConfigurator
getAuthenticationTimeout, getConnectTimeout, setAuthenticationTimeout, setConnectTimeout
-
Method Details
-
sessionLogin
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
- The target host name or addressusername
- Usernamepassword
- Password- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
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
- The target host name or addressport
- The target portusername
- Usernamepassword
- Password- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
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
- The target host name or addressusername
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
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
- The target host name or addressport
- The target portusername
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
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
- The target hostInetAddress
username
- Usernamepassword
- Password- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
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
- The target hostInetAddress
port
- The target portusername
- Usernamepassword
- Password- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
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
- The target hostInetAddress
username
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
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
- The target hostInetAddress
port
- The target portusername
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
ClientSession sessionLogin(SocketAddress target, String username, String password) throws IOException Creates a session and logs in using the provided credentials- Parameters:
target
- The targetSocketAddress
username
- Usernamepassword
- Password- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
ClientSession sessionLogin(SocketAddress target, String username, KeyPair identity) throws IOException Creates a session and logs in using the provided credentials- Parameters:
target
- The targetSocketAddress
username
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
Creates a session and logs in using the provided credentials- Parameters:
uri
- The target uripassword
- Password- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-
sessionLogin
Creates a session and logs in using the provided credentials- Parameters:
uri
- The target uriidentity
- TheKeyPair
identity- Returns:
- Created
ClientSession
- Throws:
IOException
- If failed to login or authenticate
-