Documentation ¶
Index ¶
- Constants
- func Authorized(key gl.PublicKey, authorized []gl.PublicKey) bool
- func Banner(ss ...string) string
- func BytesToAuthorized(authorized_keys []byte, old []gl.PublicKey) (authorized []gl.PublicKey)
- func CutSSH2(s string) string
- func Env(s gl.Session, shell string) (e []string)
- func EtcDirs(dirs ...string) (s string)
- func Fatal(err error)
- func FatalAnd(s string, cases ...bool)
- func FatalOr(s string, cases ...bool)
- func FileToAuthorized(bs []byte, err error) (authorized []gl.PublicKey)
- func GenerateSigner(pri string) (gl.Signer, error)
- func GetHostKey(ssh string) (pri string)
- func GetUserKeys(cwd string, fns ...string) (authorized []gl.PublicKey)
- func GetUserKeysPaths(ssh string, fns ...string) []string
- func Home(s gl.Session) string
- func Keepalive(s gl.Session, ClientAliveInterval time.Duration, ServerAliveCountMax int)
- func KeyToAuthorized(key gl.PublicKey, old []gl.PublicKey) []gl.PublicKey
- func KidsDone(ppid int)
- func NewAgentListener(s gl.Session) (net.Listener, error)
- func NoPTY(s gl.Session)
- func PidDone(pid int)
- func Println(v ...any) (ok bool)
- func SessionHandler(srv *gl.Server, conn *ssh.ServerConn, newChan ssh.NewChannel, ctx gl.Context)
- func SessionRequestCallback(s gl.Session, requestType string) bool
- func SetConsoleTitle(s gl.Session)
- func ShArgs(s gl.Session) (args []string, cmdLine string)
- func ShellOrExec(s gl.Session)
- func SubsystemHandlerAgent(s gl.Session)
- func SubsystemHandlerSftp(s gl.Session)
- func UserHomeDirs(dirs ...string) (s string)
- func UserName() string
Constants ¶
View Source
const (
AgentRequestType = "auth-agent-req@openssh.com"
)
View Source
const (
BUG = "Ж"
)
View Source
const (
SSH_AUTH_SOCK = "SSH_AUTH_SOCK"
)
Variables ¶
This section is empty.
Functions ¶
func BytesToAuthorized ¶
case no files then write from embed
func FileToAuthorized ¶
ParseAuthorizedKeys
func GenerateSigner ¶
like gl.GenerateSigner plus write key to files
func GetUserKeys ¶
get allowed keys
func GetUserKeysPaths ¶
get authorized keys paths
func KeyToAuthorized ¶
case no files and not embed then write from first client
func NewAgentListener ¶
NewAgentListener sets up a temporary Unix socket that can be communicated to the session environment and used for forwarding connections.
func SessionHandler ¶
func SessionHandler(srv *gl.Server, conn *ssh.ServerConn, newChan ssh.NewChannel, ctx gl.Context)
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
git clone https://github.com/abakum/winssh go mod init github.com/abakum/winssh go get github.com/gliderlabs/ssh go get github.com/pkg/sftp go get github.com/abakum/go-console go get github.com/xlab/closer go mod tidy
|
git clone https://github.com/abakum/winssh go mod init github.com/abakum/winssh go get github.com/gliderlabs/ssh go get github.com/pkg/sftp go get github.com/abakum/go-console go get github.com/xlab/closer go mod tidy |
example
spy
|
spy |
Click to show internal directories.
Click to hide internal directories.