Package org.apache.sshd.client.scp
Interface SimpleScpClient
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.nio.channels.Channel
,java.io.Closeable
- All Known Implementing Classes:
SimpleScpClientImpl
public interface SimpleScpClient extends java.nio.channels.Channel
A simplified synchronous API for obtaining SCP sessions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default CloseableScpClient
scpLogin(java.lang.String host, int port, java.lang.String username, java.lang.String password)
Creates an SCP session using the provided credentialsdefault CloseableScpClient
scpLogin(java.lang.String host, int port, java.lang.String username, java.security.KeyPair identity)
Creates an SCP session using the provided credentialsdefault CloseableScpClient
scpLogin(java.lang.String host, java.lang.String username, java.lang.String password)
Creates an SCP session on the default port and logs in using the provided credentialsdefault CloseableScpClient
scpLogin(java.lang.String host, java.lang.String username, java.security.KeyPair identity)
Creates an SCP session on the default port and logs in using the provided credentialsdefault CloseableScpClient
scpLogin(java.net.InetAddress host, int port, java.lang.String username, java.lang.String password)
Creates an SCP session using the provided credentialsdefault CloseableScpClient
scpLogin(java.net.InetAddress host, int port, java.lang.String username, java.security.KeyPair identity)
Creates an SCP session using the provided credentialsdefault CloseableScpClient
scpLogin(java.net.InetAddress host, java.lang.String username, java.lang.String password)
Creates an SCP session on the default port and logs in using the provided credentialsdefault CloseableScpClient
scpLogin(java.net.InetAddress host, java.lang.String username, java.security.KeyPair identity)
Creates an SCP session on the default port and logs in using the provided credentialsCloseableScpClient
scpLogin(java.net.SocketAddress target, java.lang.String username, java.lang.String password)
Creates an SCP session using the provided credentialsCloseableScpClient
scpLogin(java.net.SocketAddress target, java.lang.String username, java.security.KeyPair identity)
Creates an SCP session using the provided credentials
-
-
-
Method Detail
-
scpLogin
default CloseableScpClient scpLogin(java.lang.String host, java.lang.String username, java.lang.String password) throws java.io.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:
java.io.IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(java.lang.String host, int port, java.lang.String username, java.lang.String password) throws java.io.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:
java.io.IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(java.lang.String host, java.lang.String username, java.security.KeyPair identity) throws java.io.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:
java.io.IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(java.lang.String host, int port, java.lang.String username, java.security.KeyPair identity) throws java.io.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:
java.io.IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(java.net.InetAddress host, java.lang.String username, java.lang.String password) throws java.io.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:
java.io.IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(java.net.InetAddress host, int port, java.lang.String username, java.lang.String password) throws java.io.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:
java.io.IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(java.net.InetAddress host, java.lang.String username, java.security.KeyPair identity) throws java.io.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:
java.io.IOException
- If failed to login or authenticate
-
scpLogin
default CloseableScpClient scpLogin(java.net.InetAddress host, int port, java.lang.String username, java.security.KeyPair identity) throws java.io.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:
java.io.IOException
- If failed to login or authenticate
-
scpLogin
CloseableScpClient scpLogin(java.net.SocketAddress target, java.lang.String username, java.lang.String password) throws java.io.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:
java.io.IOException
- If failed to login or authenticate
-
scpLogin
CloseableScpClient scpLogin(java.net.SocketAddress target, java.lang.String username, java.security.KeyPair identity) throws java.io.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:
java.io.IOException
- If failed to login or authenticate
-
-