Safe Haskell | None |
---|
Network.SSH.Client.LibSSH2
- data Session
- data Channel
- data KnownHosts
- withSSH2 :: FilePath -> FilePath -> FilePath -> String -> String -> Int -> (Channel -> IO a) -> IO (Int, a)
- withSession :: String -> Int -> (Handle -> Session -> IO a) -> IO a
- withSessionBlocking :: String -> Int -> (Session -> IO a) -> IO a
- withChannel :: Session -> (Channel -> IO a) -> IO (Int, a)
- checkHost :: Session -> String -> Int -> FilePath -> IO KnownHostResult
- readAllChannel :: Channel -> IO String
- retryIfNeeded :: Handle -> Session -> IO a -> IO a
- scpSendFile :: Session -> Int -> FilePath -> FilePath -> IO Integer
- scpReceiveFile :: Session -> FilePath -> FilePath -> IO Integer
- runShellCommands :: Session -> [String] -> IO (Int, [String])
- execCommands :: Session -> [String] -> IO (Int, [String])
- socketConnect :: String -> Int -> IO Socket
Types
data KnownHosts Source
Functions
Arguments
:: FilePath | Path to known_hosts file |
-> FilePath | Path to public key file |
-> FilePath | Path to private key file |
-> String | Remote user name |
-> String | Remote host name |
-> Int | Remote port number (usually 22) |
-> (Channel -> IO a) | Actions to perform on channel |
-> IO (Int, a) |
Execute some actions within SSH2 connection. Uses public key authentication.
Arguments
:: String | Remote host name |
-> Int | Remote port number (usually 22) |
-> (Handle -> Session -> IO a) | Actions to perform on handle and session |
-> IO a |
Execute some actions within SSH2 session
Arguments
:: String | Remote host name |
-> Int | Remote port number (usually 22) |
-> (Session -> IO a) | Actions to perform on handle and session |
-> IO a |
Execute some actions within SSH2 session
withChannel :: Session -> (Channel -> IO a) -> IO (Int, a)Source
Execute some actions withing SSH2 channel
readAllChannel :: Channel -> IO StringSource
Read all data from the channel
retryIfNeeded :: Handle -> Session -> IO a -> IO aSource
Retry the action repeatedly, while it fails with EAGAIN. This does matter if using nonblocking mode.
Arguments
:: Session | |
-> Int | File creation mode (0o777, for example) |
-> FilePath | Path to local file |
-> FilePath | Remote file path |
-> IO Integer |
Send a file to remote host via SCP. Returns size of sent data.
Receive file from remote host via SCP. Returns size of received data.