{"modulePath":"github.com/superfly/flyctl","version":"v0.5.27","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package ssh\n\n## Constants\n\n```go\nconst DefaultSshUsername = \"root\"\n```\n\n## Functions\n\n```go\nfunc Connect(p *ConnectParams, addr string) (*ssh.Client, error)\n```\n\n```go\nfunc Console(ctx context.Context, sshClient *ssh.Client, cmd string, allocPTY bool, target SessionTarget) (err error)\n```\n\n```go\nfunc MarshalED25519PrivateKey(key ed25519.PrivateKey, comment string) []byte\n```\nstolen from \\`mikesmitty\\`, thanks, you are a mikesmitty and a scholar\n\n```go\nfunc New() *cobra.Command\n```\nNew initializes and returns a new apps Command.\n\n```go\nfunc NewSFTP() *cobra.Command\n```\n\n```go\nfunc RunSSHCommand(ctx context.Context, org OrganizationImpl, appName string, dialer agent.Dialer, addr string, cmd string, username string) ([]byte, error)\n```\n\n```go\nfunc SSHConnect(p *SSHParams, addr string) error\n```\n\n## Types\n\n```go\ntype ConnectParams struct {\n\tCtx            context.Context\n\tOrg            OrganizationImpl\n\tUsername       string\n\tDialer         agent.Dialer\n\tDisableSpinner bool\n\tContainer      string\n\t// Machine connects to the machine itself rather than to one of its\n\t// containers. It is mutually exclusive with Container.\n\tMachine  bool\n\tAppNames []string\n}\n```\n\n```go\ntype OrganizationImpl interface {\n\tGetID() string\n\tGetSlug() string\n}\n```\n\n```go\ntype SSHParams struct {\n\tCtx            context.Context\n\tOrg            OrganizationImpl\n\tApp            string\n\tUsername       string\n\tDialer         agent.Dialer\n\tCmd            string\n\tStdin          io.Reader\n\tStdout         io.WriteCloser\n\tStderr         io.WriteCloser\n\tDisableSpinner bool\n}\n```\n\n```go\ntype SessionTarget = ssh.SessionTarget\n```\nSessionTarget selects where a session runs on the remote machine.\n\n","path":"github.com/superfly/flyctl/internal/command/ssh","name":"ssh","synopsis":"","isRedistributable":true}
