Bugzilla – Attachment 3312 Details for
Bug 3061
requesting invalid terminal modes no longer aborts connection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test case using golang.org/x/crypto
main.go (text/plain), 901 bytes, created by
Michael Hudson-Doyle
on 2019-08-29 13:41:11 AEST
(
hide
)
Description:
test case using golang.org/x/crypto
Filename:
MIME Type:
Creator:
Michael Hudson-Doyle
Created:
2019-08-29 13:41:11 AEST
Size:
901 bytes
patch
obsolete
>package main > >import ( > "log" > "net" > "os" > > "golang.org/x/crypto/ssh" > "golang.org/x/crypto/ssh/agent" >) > >func clientConfig() *ssh.ClientConfig { > conn, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK")) > if err != nil { > log.Fatalf("net.Dial: %v", err) > } > return &ssh.ClientConfig{ > User: os.Getenv("USER"), > Auth: []ssh.AuthMethod{ssh.PublicKeysCallback(agent.NewClient(conn).Signers)}, > HostKeyCallback: ssh.InsecureIgnoreHostKey(), > } >} > >func main() { > conn, err := ssh.Dial("tcp", "localhost:22", clientConfig()) > if err != nil { > log.Fatal("unable to connect: ", err) > } > session, err := conn.NewSession() > if err != nil { > log.Fatal("unable to create session: ", err) > } > defer session.Close() > modes := ssh.TerminalModes{255: 1984} > if err := session.RequestPty("xterm", 40, 80, modes); err != nil { > log.Fatal("request for pseudo terminal failed: ", err) > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3061
: 3312