Initial import

This commit is contained in:
2025-10-10 10:05:13 +02:00
parent 3effc1597b
commit b96b6e7f8f
164 changed files with 5473 additions and 0 deletions

46
ssh/compat.go Normal file
View File

@@ -0,0 +1,46 @@
package ssh
import (
"golang.org/x/crypto/ssh"
)
const (
ChannelTypeDefault = ""
ChannelTypeAgent = "auth-agent@openssh.com"
ChannelTypeDirectTCPIP = "direct-tcpip"
ChannelTypeSession = "session"
)
const (
RequestTypeAgent = "auth-agent-req@openssh.com"
RequestTypeEnv = "env"
RequestTypeExec = "exec"
RequestTypePTY = "pty-req"
RequestTypeShell = "shell"
RequestTypeWindowChange = "window-change"
)
// Type aliases for convenience.
type (
CertChecker = ssh.CertChecker
Certificate = ssh.Certificate
Conn = ssh.Conn
ConnMetadata = ssh.ConnMetadata
Permissions = ssh.Permissions
PublicKey = ssh.PublicKey
ServerConfig = ssh.ServerConfig
Signer = ssh.Signer
)
func MarshalAuthorizedKey(in PublicKey) []byte {
return ssh.MarshalAuthorizedKey(in)
}
func ParseAuthorizedKey(in []byte) (out PublicKey, options []string, err error) {
out, _, options, _, err = ssh.ParseAuthorizedKey(in)
return
}
func ParsePublicKey(in []byte) (out PublicKey, err error) {
return ssh.ParsePublicKey(in)
}