perkeep.org: perkeep.org/pkg/blobserver/sftp Index | Files

package sftp

import "perkeep.org/pkg/blobserver/sftp"

Package sftp registers the "sftp" blobserver storage type, storing blobs one-per-file in a forest of sharded directories to a remote SFTP server over an SSH connection. It uses the same directory & file structure as the "localdisk" storage type.

Example low-level config:

"/storage/": {
    "handler": "storage-sftp",
    "handlerArgs": {
         "user": "alice",
         "addr": "10.1.2.3",
         "dir": "/remote/path/to/store/blobs/in",
         "serverFingerprint": "SHA256:fBkTSuUzQVnVMJ9+e74XNTCnQKSHldbfFiOI9kBMemc",

         "pass": "s3cr3thunteR1!",
         "passFile": "/home/alice/keys/sftp.password"
     }
},

Index

Package Files

sftp.go

type Storage Uses

type Storage struct {
    blobserver.Storage
    blob.SubFetcher
    // contains filtered or unexported fields
}

Storage implements the blobserver.Storage interface using an SFTP server.

func NewStorage Uses

func NewStorage(addr, dir string, cc *ssh.ClientConfig) (*Storage, error)

NewStorage returns a new SFTP storage implementation at the provided TCP addr (host:port) in the named directory. An empty dir means ".". The provided SSH client configured is required.

func (*Storage) String Uses

func (s *Storage) String() string

Package sftp imports 22 packages (graph). Updated 2019-09-29. Refresh now. Tools for package owners.