Top Description Methods
org.apache.sshd.sftp.client

public Interface SimpleSftpClient

extends Channel
Known Direct Implementers
org.apache.sshd.sftp.client.impl.SimpleSftpClientImpl
Imports
java.io.IOException, java.net.InetAddress, .InetSocketAddress, .SocketAddress, java.nio.channels.Channel, java.security.KeyPair, java.util.Objects, org.apache.sshd.client.simple.SimpleClientConfigurator, org.apache.sshd.common.util.ValidateUtils

A simplified synchronous API for obtaining SFTP sessions.
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public default SftpClient

Returns:

Created SftpClient - Note: closing the client also closes its underlying session
sftpLogin
(String
The target host name or address
host
,
String
Username
username
,
String
Password
password
)

Creates an SFTP session on the default port and logs in using the provided credentials

public default SftpClient

Returns:

Created SftpClient - Note: closing the client also closes its underlying session
sftpLogin
(String
The target host name or address
host
,
int
The target port
port
,
String
Username
username
,
String
Password
password
)

Creates an SFTP session using the provided credentials

public default SftpClient

Returns:

Created SftpClient - Note: closing the client also closes its underlying session
sftpLogin
(String
The target host name or address
host
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Creates an SFTP session on the default port and logs in using the provided credentials

public default SftpClient

Returns:

Created SftpClient - Note: closing the client also closes its underlying session
sftpLogin
(String
The target host name or address
host
,
int
The target port
port
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Creates an SFTP session using the provided credentials

public default SftpClient

Returns:

Created SftpClient - Note: closing the client also closes its underlying session
sftpLogin
(InetAddress
The target host InetAddress
host
,
String
Username
username
,
String
Password
password
)

Creates an SFTP session on the default port and logs in using the provided credentials

public default SftpClient

Returns:

Created SftpClient - Note: closing the client also closes its underlying session
sftpLogin
(InetAddress
The target host InetAddress
host
,
int
The target port
port
,
String
Username
username
,
String
Password
password
)

Creates an SFTP session using the provided credentials

public default SftpClient

Returns:

Created SftpClient - Note: closing the client also closes its underlying session
sftpLogin
(InetAddress
The target host InetAddress
host
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Creates an SFTP session on the default port and logs in using the provided credentials

public default SftpClient

Returns:

Created SftpClient - Note: closing the client also closes its underlying session
sftpLogin
(InetAddress
The target host InetAddress
host
,
int
The target port
port
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Creates an SFTP session using the provided credentials

public SftpClient

Returns:

Created SftpClient - Note: closing the client also closes its underlying session
sftpLogin
(SocketAddress
The target SocketAddress
target
,
String
Username
username
,
String
Password
password
)

Creates an SFTP session using the provided credentials

public SftpClient

Returns:

Created SftpClient - Note: closing the client also closes its underlying session
sftpLogin
(SocketAddress
The target SocketAddress
target
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Creates an SFTP session using the provided credentials

Inherited from java.nio.channels.Channel:
closeisOpen

Method Detail

sftpLoginback to summary
public 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:String

The target host name or address

username:String

Username

password:String

Password

Returns:SftpClient

Created SftpClient - Note: closing the client also closes its underlying session

Exceptions
IOException:
If failed to login or authenticate
sftpLoginback to summary
public default SftpClient sftpLogin(String host, int port, String username, String password) throws IOException

Creates an SFTP session using the provided credentials

Parameters
host:String

The target host name or address

port:int

The target port

username:String

Username

password:String

Password

Returns:SftpClient

Created SftpClient - Note: closing the client also closes its underlying session

Exceptions
IOException:
If failed to login or authenticate
sftpLoginback to summary
public 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:String

The target host name or address

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:SftpClient

Created SftpClient - Note: closing the client also closes its underlying session

Exceptions
IOException:
If failed to login or authenticate
sftpLoginback to summary
public default SftpClient sftpLogin(String host, int port, String username, KeyPair identity) throws IOException

Creates an SFTP session using the provided credentials

Parameters
host:String

The target host name or address

port:int

The target port

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:SftpClient

Created SftpClient - Note: closing the client also closes its underlying session

Exceptions
IOException:
If failed to login or authenticate
sftpLoginback to summary
public 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:InetAddress

The target host InetAddress

username:String

Username

password:String

Password

Returns:SftpClient

Created SftpClient - Note: closing the client also closes its underlying session

Exceptions
IOException:
If failed to login or authenticate
sftpLoginback to summary
public default SftpClient sftpLogin(InetAddress host, int port, String username, String password) throws IOException

Creates an SFTP session using the provided credentials

Parameters
host:InetAddress

The target host InetAddress

port:int

The target port

username:String

Username

password:String

Password

Returns:SftpClient

Created SftpClient - Note: closing the client also closes its underlying session

Exceptions
IOException:
If failed to login or authenticate
sftpLoginback to summary
public 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:InetAddress

The target host InetAddress

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:SftpClient

Created SftpClient - Note: closing the client also closes its underlying session

Exceptions
IOException:
If failed to login or authenticate
sftpLoginback to summary
public default SftpClient sftpLogin(InetAddress host, int port, String username, KeyPair identity) throws IOException

Creates an SFTP session using the provided credentials

Parameters
host:InetAddress

The target host InetAddress

port:int

The target port

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:SftpClient

Created SftpClient - Note: closing the client also closes its underlying session

Exceptions
IOException:
If failed to login or authenticate
sftpLoginback to summary
public SftpClient sftpLogin(SocketAddress target, String username, String password) throws IOException

Creates an SFTP session using the provided credentials

Parameters
target:SocketAddress

The target SocketAddress

username:String

Username

password:String

Password

Returns:SftpClient

Created SftpClient - Note: closing the client also closes its underlying session

Exceptions
IOException:
If failed to login or authenticate
sftpLoginback to summary
public SftpClient sftpLogin(SocketAddress target, String username, KeyPair identity) throws IOException

Creates an SFTP session using the provided credentials

Parameters
target:SocketAddress

The target SocketAddress

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:SftpClient

Created SftpClient - Note: closing the client also closes its underlying session

Exceptions
IOException:
If failed to login or authenticate