Package org.apache.sshd.sftp.client
Interface SimpleSftpClient
-
- All Superinterfaces:
AutoCloseable
,Channel
,Closeable
- All Known Implementing Classes:
SimpleSftpClientImpl
public interface SimpleSftpClient extends Channel
A simplified synchronous API for obtaining SFTP sessions.- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default SftpClient
sftpLogin(String host, int port, String username, String password)
Creates an SFTP session using the provided credentialsdefault SftpClient
sftpLogin(String host, int port, String username, KeyPair identity)
Creates an SFTP session using the provided credentialsdefault SftpClient
sftpLogin(String host, String username, String password)
Creates an SFTP session on the default port and logs in using the provided credentialsdefault SftpClient
sftpLogin(String host, String username, KeyPair identity)
Creates an SFTP session on the default port and logs in using the provided credentialsdefault SftpClient
sftpLogin(InetAddress host, int port, String username, String password)
Creates an SFTP session using the provided credentialsdefault SftpClient
sftpLogin(InetAddress host, int port, String username, KeyPair identity)
Creates an SFTP session using the provided credentialsdefault SftpClient
sftpLogin(InetAddress host, String username, String password)
Creates an SFTP session on the default port and logs in using the provided credentialsdefault SftpClient
sftpLogin(InetAddress host, String username, KeyPair identity)
Creates an SFTP session on the default port and logs in using the provided credentialsSftpClient
sftpLogin(SocketAddress target, String username, String password)
Creates an SFTP session using the provided credentialsSftpClient
sftpLogin(SocketAddress target, String username, KeyPair identity)
Creates an SFTP session using the provided credentials
-
-
-
Method Detail
-
sftpLogin
default SftpClient sftpLogin(String host, String username, String password) throws IOException
Creates an SFTP session on the default port and logs in using the provided credentials- Parameters:
host
- The target host name or addressusername
- Usernamepassword
- Password- Returns:
- Created
SftpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
sftpLogin
default SftpClient sftpLogin(String host, int port, String username, String password) throws IOException
Creates an SFTP session using the provided credentials- Parameters:
host
- The target host name or addressport
- The target portusername
- Usernamepassword
- Password- Returns:
- Created
SftpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
sftpLogin
default SftpClient sftpLogin(String host, String username, KeyPair identity) throws IOException
Creates an SFTP 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
SftpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
sftpLogin
default SftpClient sftpLogin(String host, int port, String username, KeyPair identity) throws IOException
Creates an SFTP session using the provided credentials- Parameters:
host
- The target host name or addressport
- The target portusername
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
SftpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
sftpLogin
default SftpClient sftpLogin(InetAddress host, String username, String password) throws IOException
Creates an SFTP session on the default port and logs in using the provided credentials- Parameters:
host
- The target hostInetAddress
username
- Usernamepassword
- Password- Returns:
- Created
SftpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
sftpLogin
default SftpClient sftpLogin(InetAddress host, int port, String username, String password) throws IOException
Creates an SFTP session using the provided credentials- Parameters:
host
- The target hostInetAddress
port
- The target portusername
- Usernamepassword
- Password- Returns:
- Created
SftpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
sftpLogin
default SftpClient sftpLogin(InetAddress host, String username, KeyPair identity) throws IOException
Creates an SFTP session on the default port and logs in using the provided credentials- Parameters:
host
- The target hostInetAddress
username
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
SftpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
sftpLogin
default SftpClient sftpLogin(InetAddress host, int port, String username, KeyPair identity) throws IOException
Creates an SFTP session using the provided credentials- Parameters:
host
- The target hostInetAddress
port
- The target portusername
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
SftpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
sftpLogin
SftpClient sftpLogin(SocketAddress target, String username, String password) throws IOException
Creates an SFTP session using the provided credentials- Parameters:
target
- The targetSocketAddress
username
- Usernamepassword
- Password- Returns:
- Created
SftpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
sftpLogin
SftpClient sftpLogin(SocketAddress target, String username, KeyPair identity) throws IOException
Creates an SFTP session using the provided credentials- Parameters:
target
- The targetSocketAddress
username
- Usernameidentity
- TheKeyPair
identity- Returns:
- Created
SftpClient
- Note: closing the client also closes its underlying session - Throws:
IOException
- If failed to login or authenticate
-
-