-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | FFI bindings to libssh2 SSH2 client library (http://libssh2.org/)
--
-- This package provides FFI bindings for SSH2 client library named
-- libssh2.
--
-- As of version 0.2 all blocking is handled in Haskell code rather than
-- in C code. This means that all calls are now interruptable using
-- Haskell asynchronous exceptions; for instance, it is now possible to
-- use System.Timeout in combination with "libssh2".
--
-- Note on usage on Windows: On Windows you MUST compile your
-- executable with -threaded or libssh2 will NOT work. We
-- have tested libssh2 on Windows using http://mingw.org/,
-- with http://www.openssl.org/ and http://libssh2.org/
-- compiled from source (be sure to pass the shared option to the
-- configure script for openssl to enable the shared libraries).
@package libssh2
@version 0.2.0.8
module Network.SSH.Client.LibSSH2.Types
data Session
data KnownHosts
data Channel
data Sftp
data SftpHandle
data Agent
data AgentPublicKey
class ToPointer p
toPointer :: ToPointer p => p -> Ptr ()
-- | Session directions
data Direction
INBOUND :: Direction
OUTBOUND :: Direction
int2dir :: (Eq a, Num a, Show a) => a -> [Direction]
type CStringCLen i = (CString, i)
type Size = (CULong)
type SSize = (CLong)
withCStringLenIntConv :: Integral i => String -> (CStringCLen i -> IO a) -> IO a
peekCStringPtr :: Ptr CString -> IO String
peekMaybeCStringPtr :: Ptr CString -> IO (Maybe String)
channelFromPointer :: Session -> Ptr () -> IO Channel
knownHostsFromPointer :: Ptr () -> IO KnownHosts
sessionFromPointer :: Ptr () -> IO Session
sessionGetSocket :: Session -> IO (Maybe Socket)
sessionSetSocket :: Session -> Maybe Socket -> IO ()
channelSession :: Channel -> Session
-- | Sftp support
sftpFromPointer :: Session -> Ptr () -> IO Sftp
sftpSession :: Sftp -> Session
sftpHandlePtr :: SftpHandle -> CSftpHandle
sftpHandleFromPointer :: Sftp -> Ptr () -> IO SftpHandle
sftpHandleSession :: SftpHandle -> Sftp
-- | Agent support
agentFromPointer :: Session -> Ptr () -> IO Agent
agentSession :: Agent -> Session
agentPublicKeyFromPointer :: Ptr () -> IO AgentPublicKey
withAgentPublicKey :: AgentPublicKey -> (Ptr AgentPublicKey -> IO b) -> IO b
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Types.Direction
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Types.Direction
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Types.Session
instance Data.Data.Data Network.SSH.Client.LibSSH2.Types.Session
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Types.KnownHosts
instance Data.Data.Data Network.SSH.Client.LibSSH2.Types.KnownHosts
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Types.Channel
instance Data.Data.Data Network.SSH.Client.LibSSH2.Types.Channel
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Types.AgentPublicKey
instance Data.Data.Data Network.SSH.Client.LibSSH2.Types.AgentPublicKey
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Types.AgentPublicKey
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Types.Agent
instance Network.SSH.Client.LibSSH2.Types.ToPointer Network.SSH.Client.LibSSH2.Types.Agent
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Types.SftpHandle
instance Network.SSH.Client.LibSSH2.Types.ToPointer Network.SSH.Client.LibSSH2.Types.SftpHandle
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Types.Sftp
instance Network.SSH.Client.LibSSH2.Types.ToPointer Network.SSH.Client.LibSSH2.Types.Sftp
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Types.Channel
instance Network.SSH.Client.LibSSH2.Types.ToPointer Network.SSH.Client.LibSSH2.Types.Channel
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Types.KnownHosts
instance Network.SSH.Client.LibSSH2.Types.ToPointer Network.SSH.Client.LibSSH2.Types.KnownHosts
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Types.Session
instance Network.SSH.Client.LibSSH2.Types.ToPointer Network.SSH.Client.LibSSH2.Types.Session
-- | Block until a read or write operation on a socket would succeed
--
-- On most platforms this uses threadWaitRead or
-- threadWaitWrite, but on Windows we need to do something
-- different.
--
-- See http://hackage.haskell.org/trac/ghc/ticket/5797.
module Network.SSH.Client.LibSSH2.WaitSocket
threadWaitRead :: Socket -> IO ()
threadWaitWrite :: Socket -> IO ()
module Network.SSH.Client.LibSSH2.Errors
-- | Error codes returned by libssh2.
data ErrorCode
NONE :: ErrorCode
SOCKET_NONE :: ErrorCode
BANNER_RECV :: ErrorCode
BANNER_SEND :: ErrorCode
INVALID_MAC :: ErrorCode
KEX_FALIURE :: ErrorCode
ALLOC :: ErrorCode
SOCKET_SEND :: ErrorCode
KEY_EXCHANGE_FAILURE :: ErrorCode
TIMEOUT :: ErrorCode
HOSTKEY_INIT :: ErrorCode
HOSTKEY_SIGN :: ErrorCode
DECRYPT :: ErrorCode
SOCKET_DISCONNECT :: ErrorCode
PROTO :: ErrorCode
PASSWORD_EXPIRED :: ErrorCode
FILE :: ErrorCode
METHOD_NONE :: ErrorCode
AUTHENTICATION_FAILED :: ErrorCode
PUBLICKEY_UNVERIFIED :: ErrorCode
CHANNEL_OUTOFORDER :: ErrorCode
CHANNEL_FAILURE :: ErrorCode
CHANNEL_REQUEST_DENIED :: ErrorCode
CHANNEL_UNKNOWN :: ErrorCode
CHANNEL_WINDOW_EXCEEDED :: ErrorCode
CHANNEL_PACKET_EXCEEDED :: ErrorCode
CHANNEL_CLOSED :: ErrorCode
CHANNEL_EOF_SENT :: ErrorCode
SCP_PROTOCOL :: ErrorCode
ZLIB :: ErrorCode
SOCKET_TIMEOUT :: ErrorCode
SFTP_PROTOCOL :: ErrorCode
REQUEST_DENIED :: ErrorCode
METHOD_NOT_SUPPORTED :: ErrorCode
INVAL :: ErrorCode
INVALID_POLL_TYPE :: ErrorCode
PUBLICKEY_PROTOCOL :: ErrorCode
EAGAIN :: ErrorCode
BUFFER_TOO_SMALL :: ErrorCode
BAD_USE :: ErrorCode
COMPRESS :: ErrorCode
OUT_OF_BOUNDARY :: ErrorCode
AGENT_PROTOCOL :: ErrorCode
SOCKET_RECV :: ErrorCode
ENCRYPT :: ErrorCode
BAD_SOCKET :: ErrorCode
ERROR_KNOWN_HOSTS :: ErrorCode
-- | Sftp error code returning from libssh2
data SftpErrorCode
FX_OK :: SftpErrorCode
FX_EOF :: SftpErrorCode
FX_NO_SUCH_FILE :: SftpErrorCode
FX_PERMISSION_DENIED :: SftpErrorCode
FX_FAILURE :: SftpErrorCode
FX_BAD_MESSAGE :: SftpErrorCode
FX_NO_CONNECTION :: SftpErrorCode
FX_CONNECTION_LOST :: SftpErrorCode
FX_OP_UNSUPPORTED :: SftpErrorCode
FX_INVALID_HANDLE :: SftpErrorCode
FX_NO_SUCH_PATH :: SftpErrorCode
FX_FILE_ALREADY_EXISTS :: SftpErrorCode
FX_WRITE_PROTECT :: SftpErrorCode
FX_NO_MEDIA :: SftpErrorCode
FX_NO_SPACE_ON_FILESYSTEM :: SftpErrorCode
FX_QUOTA_EXCEEDED :: SftpErrorCode
FX_UNKNOWN_PRINCIPAL :: SftpErrorCode
FX_LOCK_CONFLICT :: SftpErrorCode
FX_DIR_NOT_EMPTY :: SftpErrorCode
FX_NOT_A_DIRECTORY :: SftpErrorCode
FX_INVALID_FILENAME :: SftpErrorCode
FX_LINK_LOOP :: SftpErrorCode
-- | Exception to throw when null pointer received from libssh2.
data NULL_POINTER
class IntResult a
intResult :: IntResult a => a -> Int
-- | Get last error information.
getLastError :: Session -> IO (Int, String)
-- | Get last sftp related error.
getLastSftpError :: Sftp -> IO Int
-- | Throw an exception if negative value passed, or return unchanged
-- value.
handleInt :: (IntResult a, SshCtx ctx) => Maybe ctx -> IO a -> IO a
handleBool :: CInt -> IO Bool
-- | Throw an exception if null pointer passed, or return it casted to
-- right type.
handleNullPtr :: SshCtx c => Maybe c -> (Ptr () -> IO a) -> IO (Ptr ()) -> IO a
int2error :: Integral i => i -> ErrorCode
error2int :: Num i => ErrorCode -> i
int2sftperror :: Integral i => i -> SftpErrorCode
sftperror2int :: Num i => SftpErrorCode -> i
-- | Get currently blocked directions
blockedDirections :: Session -> IO [Direction]
threadWaitSession :: SshCtx ctx => Maybe ctx -> IO ()
instance Data.Data.Data Network.SSH.Client.LibSSH2.Errors.ErrorCode
instance GHC.Enum.Enum Network.SSH.Client.LibSSH2.Errors.ErrorCode
instance GHC.Classes.Ord Network.SSH.Client.LibSSH2.Errors.ErrorCode
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Errors.ErrorCode
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Errors.ErrorCode
instance Data.Data.Data Network.SSH.Client.LibSSH2.Errors.NULL_POINTER
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Errors.NULL_POINTER
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Errors.NULL_POINTER
instance Data.Data.Data Network.SSH.Client.LibSSH2.Errors.SftpErrorCode
instance GHC.Enum.Enum Network.SSH.Client.LibSSH2.Errors.SftpErrorCode
instance GHC.Classes.Ord Network.SSH.Client.LibSSH2.Errors.SftpErrorCode
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Errors.SftpErrorCode
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Errors.SftpErrorCode
instance Network.SSH.Client.LibSSH2.Errors.SshCtx Network.SSH.Client.LibSSH2.Types.Session
instance Network.SSH.Client.LibSSH2.Errors.SshCtx Network.SSH.Client.LibSSH2.Types.Sftp
instance Network.SSH.Client.LibSSH2.Errors.SshCtx Network.SSH.Client.LibSSH2.Types.SftpHandle
instance Network.SSH.Client.LibSSH2.Errors.SshCtx Network.SSH.Client.LibSSH2.Types.Agent
instance GHC.Exception.Type.Exception Network.SSH.Client.LibSSH2.Errors.SftpErrorCode
instance Network.SSH.Client.LibSSH2.Errors.IntResult GHC.Types.Int
instance Network.SSH.Client.LibSSH2.Errors.IntResult (GHC.Types.Int, a)
instance Network.SSH.Client.LibSSH2.Errors.IntResult (GHC.Types.Int, a, b)
instance Network.SSH.Client.LibSSH2.Errors.IntResult (GHC.Types.Int, a, b, c)
instance Network.SSH.Client.LibSSH2.Errors.IntResult Foreign.C.Types.CInt
instance Network.SSH.Client.LibSSH2.Errors.IntResult Foreign.C.Types.CLong
instance Network.SSH.Client.LibSSH2.Errors.IntResult Foreign.C.Types.CLLong
instance GHC.Exception.Type.Exception Network.SSH.Client.LibSSH2.Errors.NULL_POINTER
instance GHC.Exception.Type.Exception Network.SSH.Client.LibSSH2.Errors.ErrorCode
module Network.SSH.Client.LibSSH2.Foreign
data KnownHosts
data KnownHostResult
MATCH :: KnownHostResult
MISMATCH :: KnownHostResult
NOTFOUND :: KnownHostResult
FAILURE :: KnownHostResult
data KnownHostType
TYPE_MASK :: KnownHostType
TYPE_PLAIN :: KnownHostType
TYPE_SHA1 :: KnownHostType
TYPE_CUSTOM :: KnownHostType
KEYENC_MASK :: KnownHostType
KEYENC_RAW :: KnownHostType
KEYENC_BASE64 :: KnownHostType
KEY_MASK :: KnownHostType
KEY_SHIFT :: KnownHostType
KEY_RSA1 :: KnownHostType
KEY_SSHRSA :: KnownHostType
KEY_SSHDSS :: KnownHostType
data KnownHost
KnownHost :: CUInt -> Ptr () -> String -> String -> [KnownHostType] -> KnownHost
[khMagic] :: KnownHost -> CUInt
[khNode] :: KnownHost -> Ptr ()
[khName] :: KnownHost -> String
[khKey] :: KnownHost -> String
[khTypeMask] :: KnownHost -> [KnownHostType]
-- | Initialize libssh2. Pass True to enable encryption or False to disable
-- it.
initialize :: Bool -> IO ()
-- | Deinitialize libssh2.
exit :: IO ()
-- | Create Session object
initSession :: IO Session
-- | Free Session object's memory
freeSession :: Session -> IO ()
-- | Disconnect session (but do not free memory)
disconnectSession :: Session -> String -> IO ()
-- | Run SSH handshake on network socket.
handshake :: Session -> Socket -> IO ()
setBlocking :: Session -> Bool -> IO ()
-- | Create KnownHosts object for given session.
initKnownHosts :: Session -> IO KnownHosts
-- | Free KnownHosts object's memory
freeKnownHosts :: KnownHosts -> IO ()
-- | Read known hosts from file
knownHostsReadFile :: KnownHosts -> FilePath -> IO Int
-- | Get remote host public key
getHostKey :: Session -> IO (String, Size, CInt)
-- | Check host data against known hosts.
checkKnownHost :: KnownHosts -> String -> Int -> String -> [KnownHostType] -> IO KnownHostResult
-- | Perform public key authentication.
publicKeyAuthFile :: Session -> String -> String -> String -> String -> IO ()
-- | Perform username/password authentication.
usernamePasswordAuth :: Session -> String -> String -> IO ()
-- | Open a channel for session.
openChannelSession :: Session -> IO Channel
-- | Close channel (but do not free memory)
closeChannel :: Channel -> IO ()
-- | Free channel object's memory
freeChannel :: Channel -> IO ()
channelSendEOF :: Channel -> IO ()
channelWaitEOF :: Channel -> IO ()
channelIsEOF :: Channel -> IO Bool
-- | Read data from channel.
readChannel :: Channel -> Size -> IO ByteString
-- | Write data to channel.
writeChannel :: Channel -> ByteString -> IO ()
-- | Write all data to channel from handle. Returns amount of transferred
-- data.
writeChannelFromHandle :: Channel -> Handle -> IO Integer
-- | Read all data from channel to handle. Returns amount of transferred
-- data.
readChannelToHandle :: Channel -> Handle -> Offset -> IO Integer
channelProcess :: Channel -> String -> String -> IO ()
-- | Execute command
channelExecute :: Channel -> String -> IO ()
-- | Execute shell command
channelShell :: Channel -> IO ()
requestPTY :: Channel -> String -> IO ()
requestPTYEx :: Channel -> String -> String -> Int -> Int -> Int -> Int -> IO Int
directTcpIpEx :: Session -> String -> Int -> String -> Int -> IO Channel
-- | Get channel exit status
channelExitStatus :: Channel -> IO Int
-- | Get channel exit signal. Returns: (possibly error code, exit signal
-- name, possibly error message, possibly language code).
channelExitSignal :: Channel -> IO (Int, String, Maybe String, Maybe String)
-- | Create SCP file send channel.
scpSendChannel :: Session -> String -> Int -> Int64 -> POSIXTime -> POSIXTime -> IO Channel
-- | Create SCP file receive channel. TODO: receive struct stat also.
scpReceiveChannel :: Session -> FilePath -> IO (Channel, Offset)
pollChannelRead :: Channel -> IO Bool
sftpInit :: Session -> IO Sftp
sftpShutdown :: Sftp -> IO ()
-- | Open directory file handler
sftpOpenDir :: Sftp -> String -> IO SftpHandle
-- | Read directory from file handler
sftpReadDir :: SftpHandle -> IO (Maybe (ByteString, SftpAttributes))
-- | Close file handle
sftpCloseHandle :: SftpHandle -> IO ()
-- | Open regular file handler
sftpOpenFile :: Sftp -> String -> Int -> [SftpFileTransferFlags] -> IO SftpHandle
-- | Rename a file on the sftp server
sftpRenameFile :: Sftp -> FilePath -> FilePath -> IO ()
-- | Rename a file on the sftp server
sftpRenameFileEx :: Sftp -> FilePath -> FilePath -> [RenameFlag] -> IO ()
-- | Upload file to the sftp server
sftpWriteFileFromHandler :: SftpHandle -> Handle -> IO Integer
-- | Download file from the sftp server
sftpReadFileToHandler :: SftpHandle -> Handle -> Int -> IO Int
-- | Get sftp attributes from the sftp handler
sftpFstat :: SftpHandle -> IO SftpAttributes
-- | Delete file from SFTP server
sftpDeleteFile :: Sftp -> FilePath -> IO ()
data RenameFlag
RENAME_OVERWRITE :: RenameFlag
RENAME_ATOMIC :: RenameFlag
RENAME_NATIVE :: RenameFlag
-- | Sftp support
data SftpFileTransferFlags
FXF_READ :: SftpFileTransferFlags
FXF_WRITE :: SftpFileTransferFlags
FXF_APPEND :: SftpFileTransferFlags
FXF_CREAT :: SftpFileTransferFlags
FXF_TRUNC :: SftpFileTransferFlags
FXF_EXCL :: SftpFileTransferFlags
data SftpAttributes
SftpAttributes :: CULong -> CULLong -> CULong -> CULong -> CULong -> CULong -> CULong -> SftpAttributes
[saFlags] :: SftpAttributes -> CULong
[saFileSize] :: SftpAttributes -> CULLong
[saUid] :: SftpAttributes -> CULong
[saGid] :: SftpAttributes -> CULong
[saPermissions] :: SftpAttributes -> CULong
[saAtime] :: SftpAttributes -> CULong
[saMtime] :: SftpAttributes -> CULong
data Agent
data AgentPublicKey
-- | Agent support
--
-- Initialize a new ssh agent handle.
agentInit :: Session -> IO Agent
-- | Attempt to establish a connection to an ssh agent process. | The
-- environment variable SSH_AUTH_SOCK is used to determine where
-- to connect on unix.
agentConnect :: Agent -> IO ()
-- | Cleans up a connection to an ssh agent.
agentDisconnect :: Agent -> IO ()
-- | Get or update the list of known identities. Must be called at least
-- once.
agentListIdentities :: Agent -> IO ()
-- | Copies one identity from the agent to the local process.
agentGetIdentity :: Agent -> Maybe AgentPublicKey -> IO (Maybe AgentPublicKey)
-- | Copies all the keys from the agent to the local process.
agentGetIdentities :: Agent -> IO [AgentPublicKey]
agentFree :: Agent -> IO ()
-- | Return the comment from the given agent public key.
agentPublicKeyComment :: AgentPublicKey -> IO ByteString
-- | Return the bytes of the given agent public key.
agentPublicKeyBlob :: AgentPublicKey -> IO ByteString
-- | Perform agent based public key authentication. You almost certainly
-- want @agentAuthenticate instead of this, since this only does one
-- round of authentication with the agent.
agentUserAuth :: Agent -> String -> AgentPublicKey -> IO ()
-- | Authenticate with an ssh agent. Takes a user and an agent and tries
-- each key from the agent in succession. Throws AUTHENTICATION_FAILED if
-- it's unable to authenticate. If you call this, you need to call
-- @agentListIdentities at least once.
agentAuthenticate :: String -> Agent -> IO ()
data TraceFlag
T_TRANS :: TraceFlag
T_KEX :: TraceFlag
T_AUTH :: TraceFlag
T_CONN :: TraceFlag
T_SCP :: TraceFlag
T_SFTP :: TraceFlag
T_ERROR :: TraceFlag
T_PUBLICKEY :: TraceFlag
T_SOCKET :: TraceFlag
setTraceMode :: Session -> [TraceFlag] -> IO ()
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Foreign.KnownHostType
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Foreign.KnownHostType
instance GHC.Enum.Enum Network.SSH.Client.LibSSH2.Foreign.KnownHostResult
instance GHC.Classes.Ord Network.SSH.Client.LibSSH2.Foreign.KnownHostResult
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Foreign.KnownHostResult
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Foreign.KnownHostResult
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Foreign.KnownHost
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Foreign.KnownHost
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Foreign.TraceFlag
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Foreign.TraceFlag
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Foreign.SftpFileTransferFlags
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Foreign.SftpFileTransferFlags
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Foreign.OpenExFlags
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Foreign.OpenExFlags
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Foreign.RenameFlag
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Foreign.RenameFlag
instance GHC.Classes.Eq Network.SSH.Client.LibSSH2.Foreign.SftpAttributes
instance GHC.Show.Show Network.SSH.Client.LibSSH2.Foreign.SftpAttributes
module Network.SSH.Client.LibSSH2
data Session
data Channel
data KnownHosts
data Sftp
data SftpHandle
data SftpAttributes
type SftpList = [(ByteString, SftpAttributes)]
-- | Sftp support
data SftpFileTransferFlags
-- | Execute some actions within SSH2 connection. Uses public key
-- authentication.
withSSH2 :: FilePath -> FilePath -> FilePath -> String -> String -> String -> Int -> (Session -> IO a) -> IO a
-- | Execute some actions within SSH2 connection. Uses username/password
-- authentication.
withSSH2User :: FilePath -> String -> String -> String -> Int -> (Session -> IO a) -> IO a
-- | Execute some actions within SSH2 connection. Uses agent based public
-- key authentication.
withSSH2Agent :: String -> String -> String -> Int -> (Session -> IO a) -> IO a
-- | Execute some actions within SSH2 session
withSession :: String -> Int -> (Session -> IO a) -> IO a
-- | Execute some actions withing SSH2 channel
withChannel :: Session -> (Channel -> IO a) -> IO (Int, a)
-- | Generalization of withChannel
withChannelBy :: IO a -> (a -> Channel) -> (a -> IO b) -> IO (Int, b)
checkHost :: Session -> String -> Int -> FilePath -> IO KnownHostResult
-- | Read all data from the channel
--
-- Although this function returns a lazy bytestring, the data is
-- not read lazily.
readAllChannel :: Channel -> IO ByteString
-- | Write a lazy bytestring to the channel
writeAllChannel :: Channel -> ByteString -> IO ()
-- | Send a file to remote host via SCP. Returns size of sent data.
scpSendFile :: Session -> Int -> FilePath -> FilePath -> IO Integer
-- | Receive file from remote host via SCP. Returns size of received data.
scpReceiveFile :: Session -> FilePath -> FilePath -> IO Integer
runShellCommands :: Session -> [String] -> IO (Int, [ByteString])
execCommands :: Session -> [String] -> IO (Int, [ByteString])
directTcpIpEx :: Session -> String -> Int -> String -> Int -> IO Channel
-- | Execute some actions within SFTP connection. Uses public key
-- authentication.
withSFTP :: FilePath -> FilePath -> FilePath -> String -> String -> String -> Int -> (Sftp -> IO a) -> IO a
-- | Execute some actions within SFTP connection. Uses username/password
-- authentication.
withSFTPUser :: FilePath -> String -> String -> String -> Int -> (Sftp -> IO a) -> IO a
-- | Execute some actions within SFTP session
withSftpSession :: Session -> (Sftp -> IO a) -> IO a
-- | Reads directory information Returns the list of files with attributes,
-- directory . and .. are not excluded
sftpListDir :: Sftp -> FilePath -> IO SftpList
-- | Rename a file on the sftp server
sftpRenameFile :: Sftp -> FilePath -> FilePath -> IO ()
-- | Send a file to remote host via SFTP Returns size of sent data.
sftpSendFile :: Sftp -> FilePath -> FilePath -> Int -> IO Integer
-- | Send a file to remote host via SFTP Returns size of sent data.
sftpSendFromHandle :: Sftp -> Handle -> FilePath -> Int -> IO Integer
-- | Received a file from remote host via SFTP Returns size of received
-- data.
sftpReceiveFile :: Sftp -> FilePath -> FilePath -> IO Integer
-- | Download file from the sftp server
sftpReadFileToHandler :: SftpHandle -> Handle -> Int -> IO Int
-- | Get sftp attributes from the sftp handler
sftpFstat :: SftpHandle -> IO SftpAttributes
-- | Delete file from SFTP server
sftpDeleteFile :: Sftp -> FilePath -> IO ()
-- | Similar to Network.connectTo, but does not socketToHandle.
socketConnect :: String -> Int -> IO Socket
sessionInit :: String -> Int -> IO Session
sessionClose :: Session -> IO ()