Documentation
¶
Index ¶
- Constants
- func KeyPrint(dialAddr string, addr net.Addr, key ssh.PublicKey) error
- type SsftpClient
- func (s *SsftpClient) DownloadFile(client *sftp.Client, remoteFile, localFile string) (err error)
- func (s *SsftpClient) IsRemoteFileADir(client *sftp.Client, remoteFile string) (bool, error)
- func (s *SsftpClient) ListFiles(client *sftp.Client, remoteDir string) (err error)
- func (s *SsftpClient) PublicKeyFile(file string) ssh.AuthMethod
- func (s *SsftpClient) RecursiveDownload(client *sftp.Client, remoteFile string, localFile string) (err error)
- func (s *SsftpClient) SetOption(param string) error
- func (s *SsftpClient) SftpConnect(remote sftppath.Path, port string, sshkeyFile string) (*sftp.Client, error)
- func (s *SsftpClient) UploadFile(client *sftp.Client, localFile, remoteFile string) (err error)
- type SshOptions
Constants ¶
View Source
const StrictHostKeyCheckingNameParameter = "StrictHostKeyChecking"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SsftpClient ¶
type SsftpClient struct {
// contains filtered or unexported fields
}
func NewSsftpClient ¶
func NewSsftpClient(log *logrus.Logger, sshOpts SshOptions) (*SsftpClient, error)
func (*SsftpClient) DownloadFile ¶
func (s *SsftpClient) DownloadFile(client *sftp.Client, remoteFile, localFile string) (err error)
Download file from sftp server
func (*SsftpClient) IsRemoteFileADir ¶
func (*SsftpClient) ListFiles ¶
func (s *SsftpClient) ListFiles(client *sftp.Client, remoteDir string) (err error)
func (*SsftpClient) PublicKeyFile ¶
func (s *SsftpClient) PublicKeyFile(file string) ssh.AuthMethod
func (*SsftpClient) RecursiveDownload ¶
func (*SsftpClient) SetOption ¶
func (s *SsftpClient) SetOption(param string) error
SetOption is waiting for parameter with this format option=value
func (*SsftpClient) SftpConnect ¶
func (*SsftpClient) UploadFile ¶
func (s *SsftpClient) UploadFile(client *sftp.Client, localFile, remoteFile string) (err error)
Upload file to sftp server
type SshOptions ¶
type SshOptions []string
Structs to handle multiple SSHOptions arguments from the command line
func (*SshOptions) Set ¶
func (i *SshOptions) Set(value string) error
func (*SshOptions) String ¶
func (i *SshOptions) String() string
Click to show internal directories.
Click to hide internal directories.