Package org.apache.sshd.scp.client
Interface SimpleScpClient
- All Superinterfaces:
AutoCloseable
,Channel
,Closeable
- All Known Implementing Classes:
SimpleScpClientImpl
A simplified synchronous API for obtaining SCP sessions.
-
Method Summary
Modifier and TypeMethodDescriptiondefault CloseableScpClient
Creates an SCP session using the provided credentialsdefault CloseableScpClient
Creates an SCP session using the provided credentialsdefault CloseableScpClient
Creates an SCP session on the default port and logs in using the provided credentialsdefault CloseableScpClient
Creates an SCP session on the default port and logs in using the provided credentialsdefault CloseableScpClient
scpLogin
(InetAddress host, int port, String username, String password) Creates an SCP session using the provided credentialsdefault CloseableScpClient
scpLogin
(InetAddress host, int port, String username, KeyPair identity) Creates an SCP session using the provided credentialsdefault CloseableScpClient
scpLogin
(InetAddress host, String username, String password) Creates an SCP session on the default port and logs in using the provided credentialsdefault CloseableScpClient
scpLogin
(InetAddress host, String username, KeyPair identity) Creates an SCP session on the default port and logs in using the provided credentialsscpLogin
(SocketAddress target, String username, String password) Creates an SCP session using the provided credentialsscpLogin
(SocketAddress target, String username, KeyPair identity) Creates an SCP session using the provided credentials
-
Method Details
-
scpLogin
default CloseableScpClient scpLogin(String host, String username, String password) throws IOException Creates an SCP session on the default port and logs in using the provided credentials- Parameters:
host
- The target host name or addressusername
- Usernamepassword
- Password- Returns:
- Created
CloseableScpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(String host, int port, String username, String password) throws IOException Creates an SCP session using the provided credentials- Parameters:
host
- The target host name or addressport
- The target portusername
- Usernamepassword
- Password- Returns:
- Created
CloseableScpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(String host, String username, KeyPair identity) throws IOException Creates an SCP 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
CloseableScpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(String host, int port, String username, KeyPair identity) throws IOException Creates an SCP session using the provided credentials- Parameters:
host
- The target host name or addressport
- The target portusername
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
CloseableScpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(InetAddress host, String username, String password) throws IOException Creates an SCP session on the default port and logs in using the provided credentials- Parameters:
host
- The target hostInetAddress
username
- Usernamepassword
- Password- Returns:
- Created
CloseableScpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(InetAddress host, int port, String username, String password) throws IOException Creates an SCP session using the provided credentials- Parameters:
host
- The target hostInetAddress
port
- The target portusername
- Usernamepassword
- Password- Returns:
- Created
CloseableScpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(InetAddress host, String username, KeyPair identity) throws IOException Creates an SCP session on the default port and logs in using the provided credentials- Parameters:
host
- The target hostInetAddress
username
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
CloseableScpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(InetAddress host, int port, String username, KeyPair identity) throws IOException Creates an SCP session using the provided credentials- Parameters:
host
- The target hostInetAddress
port
- The target portusername
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
CloseableScpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
scpLogin
CloseableScpClient scpLogin(SocketAddress target, String username, String password) throws IOException Creates an SCP session using the provided credentials- Parameters:
target
- The targetSocketAddress
username
- Usernamepassword
- Password- Returns:
- Created
CloseableScpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
scpLogin
CloseableScpClient scpLogin(SocketAddress target, String username, KeyPair identity) throws IOException Creates an SCP session using the provided credentials- Parameters:
target
- The targetSocketAddress
username
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
CloseableScpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-