Initial import
This commit is contained in:
46
ssh/compat.go
Normal file
46
ssh/compat.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user