Files
conduit/ssh/compat.go
2025-10-10 10:05:28 +02:00

47 lines
1.1 KiB
Go

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)
}