Documentation ¶
Index ¶
- Variables
- func NewCertificate(Serial uint64, CertType uint32, KeyId string, ValidBefore uint64, ...) ssh.Certificate
- func NewControlClientConn(c net.Conn) (ssh.Conn, <-chan ssh.NewChannel, <-chan *ssh.Request, error)
- func TsshMain(args *SshArgs) int
- type CASigner
- type Config
- type HostsCerts
- type SshArgs
- type StringSet
Constants ¶
This section is empty.
Variables ¶
View Source
var DebugF = func(format string) string { return fmt.Sprintf("\033[0;36m%s:\033[0m %s\r\n", DebugPrefix, format) }
View Source
var DebugPrefix = "debug"
View Source
var ExitOnForwardFailure = false
View Source
var KeyAlgo2id = map[string]string{ ssh.KeyAlgoRSA: "id_rsa", ssh.KeyAlgoDSA: "id_dsa", ssh.KeyAlgoECDSA256: "id_ecdsa", ssh.KeyAlgoSKECDSA256: "id_ecdsa-sk", ssh.KeyAlgoECDSA384: "id_ecdsa", ssh.KeyAlgoECDSA521: "id_ecdsa", ssh.KeyAlgoED25519: "id_ed25519", ssh.KeyAlgoSKED25519: "id_ecdsa-sk", }
View Source
var SecretEncodeKey = []byte("THE_UNSAFE_KEY_FOR_ENCODING_ONLY")
View Source
var WarningF = func(format string) string { return fmt.Sprintf("\033[0;33mWarning: %s\033[0m\r\n", format) }
Functions ¶
func NewCertificate ¶
func NewControlClientConn ¶
NewControlClientConn establishes an SSH connection over an OpenSSH ControlMaster socket c in proxy mode. The Request and NewChannel channels must be serviced or the connection will hang.
Types ¶
type CASigner ¶
type CASigner struct { ssh.Certificate // func newCertificate ssh.Signer // CA signer }
func NewCASigner ¶
func NewCASigner(certificate ssh.Certificate, signer ssh.Signer) *CASigner
type Config ¶
type Config struct { *ssh_config.Config Signers map[string][]ssh.Signer // id signer CASigner map[string][]*CASigner // CA signer Include *StringSet // Писать ли алиас в config и файлы id_x-cert.pub }
func NewConfig ¶
func NewConfig(config *ssh_config.Config) *Config
func (*Config) GetAllCASigner ¶
Возвращаем все сертификаты для alias
func (*Config) GetAllSigner ¶
Возвращаем все ключи для alias
type HostsCerts ¶
type SshArgs ¶
type SshArgs struct { Ver bool `arg:"-V,--version" help:"show program's version number and exit"` Destination string `arg:"positional" help:"alias in ~/.ssh/config, or [user@]hostname[:port]"` Command string `arg:"positional" help:"command to execute instead of a login shell"` Argument []string `arg:"positional" help:"command arguments separated by spaces"` ForwardAgent bool `arg:"-A,--" help:"enable forwarding the ssh agent connection"` NoForwardAgent bool `arg:"-a,--" help:"disable forwarding the ssh agent connection"` DisableTTY bool `arg:"-T,--" help:"disable pseudo-terminal allocation"` ForceTTY bool `arg:"-t,--" help:"force pseudo-terminal allocation"` IPv4Only bool `arg:"-4,--" help:"forces ssh to use IPv4 addresses only"` IPv6Only bool `arg:"-6,--" help:"forces ssh to use IPv6 addresses only"` Gateway bool `arg:"-g,--" help:"forwarding allows remote hosts to connect"` Background bool `arg:"-f,--" help:"run as a background process, implies -n"` NoCommand bool `arg:"-N,--" help:"do not execute a remote command"` Port int `arg:"-p,--" placeholder:"port" help:"port to connect to on the remote host"` LoginName string `arg:"-l,--" placeholder:"login_name" help:"the user to log in as on the remote machine"` Identity multiStr `arg:"-i,--" placeholder:"identity_file" help:"identity (private key) for public key auth"` CipherSpec string `arg:"-c,--" placeholder:"cipher_spec" help:"cipher specification for encrypting the session"` ConfigFile string `arg:"-F,--" placeholder:"configfile" help:"an alternative per-user configuration file"` ProxyJump string `arg:"-J,--" placeholder:"destination" help:"jump hosts separated by comma characters"` Option sshOption `` /* 137-byte string literal not displayed */ StdioForward string `arg:"-W,--" placeholder:"host:port" help:"forward stdin and stdout to host on port"` DynamicForward bindArgs `arg:"-D,--" placeholder:"[bind_addr:]port" help:"dynamic port forwarding ( socks5 proxy )"` LocalForward forwardArgs `arg:"-L,--" placeholder:"[bind_addr:]port:host:hostport" help:"local port forwarding"` RemoteForward forwardArgs `arg:"-R,--" placeholder:"[bind_addr:]port:host:hostport" help:"remote port forwarding"` X11Untrusted bool `arg:"-X,--" help:"enables X11 forwarding"` NoX11Forward bool `arg:"-x,--" help:"disables X11 forwarding"` X11Trusted bool `arg:"-Y,--" help:"enables trusted X11 forwarding"` Reconnect bool `arg:"--reconnect" help:"reconnect when background(-f) process exits"` DragFile bool `arg:"--dragfile" help:"enable drag files and directories to upload"` TraceLog bool `arg:"--tracelog" help:"enable trzsz detect trace logs for debugging"` Relay bool `arg:"--relay" help:"force trzsz run as a relay on the jump server"` Debug bool `arg:"-v,--debug" help:"verbose mode for debugging, similar to ssh's -v"` Zmodem bool `arg:"--zmodem" help:"enable zmodem lrzsz ( rz / sz ) feature"` NewHost bool `arg:"--new-host" help:"[tools] add new host to configuration"` EncSecret bool `arg:"--enc-secret" help:"[tools] encode secret for configuration"` InstallTrzsz bool `arg:"--install-trzsz" help:"[tools] install trzsz to the remote server"` InstallPath string `arg:"--install-path" placeholder:"path" help:"[tools] install path, default: '~/.local/bin/'"` TrzszVersion string `arg:"--trzsz-version" placeholder:"x.x.x" help:"[tools] install the specified version of trzsz"` TrzszBinPath string `arg:"--trzsz-bin-path" placeholder:"path" help:"[tools] trzsz binary installation package path"` Config *Config `arg:"-"` Daemon bool `arg:"-"` // contains filtered or unexported fields }
func (SshArgs) Description ¶
type StringSet ¶
type StringSet struct {
// contains filtered or unexported fields
}
Набор уникальных не пустых строк с сохранением порядка добавки
func NewStringSet ¶
Аналог NewStringSet().Add(itmes...)
func (*StringSet) Add ¶
Добавим уникальные не пустые строки items в набор с сохранением порядка добавки.
func (*StringSet) Del ¶
Удалим уникальные не пустые строки items из набора с сохранением порядка. a,b - a,c = b
Source Files ¶
- agent.go
- agent_unix.go
- algo.go
- args.go
- cert.go
- cipher.go
- config.go
- control.go
- ctrl_unix.go
- env.go
- expect.go
- forward.go
- lang.go
- login.go
- main.go
- otp.go
- prompt.go
- term_unix.go
- theme.go
- tmgr.go
- tmgr_tmux.go
- tokens.go
- tools.go
- tools_enc_secret.go
- tools_install_trzsz.go
- tools_new_host.go
- trzsz.go
- util_unix.go
- xauth.go
Click to show internal directories.
Click to hide internal directories.