Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/crypto/ssh: TestValidTerminalMode fails with some shells #38037

Open
RKinsey opened this issue Mar 23, 2020 · 1 comment
Open

x/crypto/ssh: TestValidTerminalMode fails with some shells #38037

RKinsey opened this issue Mar 23, 2020 · 1 comment

Comments

@RKinsey
Copy link

@RKinsey RKinsey commented Mar 23, 2020

What version of Go are you using (go version)?

$ go version
go version go1.14.1 darwin/amd64
(also happens on go1.14 linux/amd64)

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/rkinsey/Library/Caches/go-build"
GOENV="/Users/rkinsey/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/rkinsey/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/rkinsey/Documents/GitRepos/crypto/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/go-build428503898=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

go test golang.org/x/crypto/ssh/test with login shell set to zsh

What did you expect to see?

All tests pass

What did you see instead?

--- FAIL: TestValidTerminalMode (0.27s)
    session_test.go:265: terminal mode failure: expected -echo in stty output, got Last login: Mon Mar 23 02:34:38 2020
        debug2: do_setup_env: set TMPDIR
rkinsey@Rosss-MBP ~ % stty -a && exit
        speed 9600 baud; 80 rows; 40 columns;
        lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
                -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
                -extproc
        iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -iutf8
                -ignbrk brkint -inpck -ignpar -parmrk
        oflags: opost onlcr -oxtabs -onocr -onlret
        cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
                -dtrflow -mdmbuf
        cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ;
                eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
                min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
                stop = ^S; susp = ^Z; time = 0; werase = ^W;
    test_unix_test.go:254: sshd: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/sshd_config line 10: Deprecated option KeyRegenerationInterval
        /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/sshd_config line 11: Deprecated option ServerKeyBits
        /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/sshd_config line 17: Deprecated option RSAAuthentication
        /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/sshd_config line 22: Deprecated option RhostsRSAAuthentication
        debug1: inetd sockets after dupping: 4, 5
        BSM audit: getaddrinfo failed for UNKNOWN: nodename nor servname provided, or not known
        Connection from UNKNOWN port 65535 on /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/unixConnection337358175/ssh port 65535
        debug1: Client protocol version 2.0; client software version Go
        debug1: no match: Go
        debug1: Local version string SSH-2.0-OpenSSH_7.9
        debug2: fd 4 setting O_NONBLOCK
        debug2: Network child is on pid 82065
        debug1: list_hostkey_types: rsa-sha2-512,rsa-sha2-256,ssh-rsa,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256 [preauth]
        debug1: SSH2_MSG_KEXINIT sent [preauth]
        debug1: SSH2_MSG_KEXINIT received [preauth]
        debug2: local server KEXINIT proposal [preauth]
        debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1 [preauth]
        debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256 [preauth]
        debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [preauth]
        debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [preauth]
        debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
        debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
        debug2: compression ctos: none,zlib@openssh.com [preauth]
        debug2: compression stoc: none,zlib@openssh.com [preauth]
        debug2: languages ctos:  [preauth]
        debug2: languages stoc:  [preauth]
        debug2: first_kex_follows 0  [preauth]
        debug2: reserved 0  [preauth]
        debug2: peer client KEXINIT proposal [preauth]
        debug2: KEX algorithms: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1 [preauth]
        debug2: host key algorithms: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss,ssh-ed25519 [preauth]
        debug2: ciphers ctos: aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr [preauth]
        debug2: ciphers stoc: aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr [preauth]
        debug2: MACs ctos: hmac-sha2-256-etm@openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96 [preauth]
        debug2: MACs stoc: hmac-sha2-256-etm@openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96 [preauth]
        debug2: compression ctos: none [preauth]
        debug2: compression stoc: none [preauth]
        debug2: languages ctos:  [preauth]
        debug2: languages stoc:  [preauth]
        debug2: first_kex_follows 0  [preauth]
        debug2: reserved 0  [preauth]
        debug1: kex: algorithm: curve25519-sha256@libssh.org [preauth]
        debug1: kex: host key algorithm: ecdsa-sha2-nistp256 [preauth]
        debug1: kex: client->server cipher: aes128-gcm@openssh.com MAC:  compression: none [preauth]
        debug1: kex: server->client cipher: aes128-gcm@openssh.com MAC:  compression: none [preauth]
        debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
        debug2: monitor_read: 6 used once, disabling now
        debug2: set_newkeys: mode 1 [preauth]
        debug1: rekey after 4294967296 blocks [preauth]
        debug1: SSH2_MSG_NEWKEYS sent [preauth]
        debug1: expecting SSH2_MSG_NEWKEYS [preauth]
        debug1: SSH2_MSG_NEWKEYS received [preauth]
        debug2: set_newkeys: mode 0 [preauth]
        debug1: rekey after 4294967296 blocks [preauth]
        debug1: KEX done [preauth]
        debug1: userauth-request for user rkinsey service ssh-connection method none [preauth]
        debug1: attempt 0 failures 0 [preauth]
        debug2: parse_server_config: config reprocess config len 997
        reprocess config line 17: Deprecated option RSAAuthentication
        reprocess config line 22: Deprecated option RhostsRSAAuthentication
        debug2: monitor_read: 8 used once, disabling now
        debug2: input_userauth_request: setting up authctxt for rkinsey [preauth]
        debug2: monitor_read: 4 used once, disabling now
        debug2: monitor_read: 10 used once, disabling now
        debug1: userauth_send_banner: sent [preauth]
        debug2: input_userauth_request: try method none [preauth]
        debug1: userauth-request for user rkinsey service ssh-connection method publickey [preauth]
        debug1: attempt 1 failures 0 [preauth]
        debug2: input_userauth_request: try method publickey [preauth]
        debug1: userauth_pubkey: test pkalg ecdsa-sha2-nistp256 pkblob ECDSA SHA256:DbuSF5a8c3JMmpZ5WiK8oLAx97Uu8zIAFReb/NyTPuo [preauth]
        debug1: temporarily_use_uid: 501/20 (e=501/20)
        debug1: trying public key file /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys
        debug1: fd 6 clearing O_NONBLOCK
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:1: check options: 'ssh-dss AAAAB3NzaC1kc3MAAACBAPo8NITJeIj2N82z3ta4zjoxIMJiU6pbDzRqM3XoCiG0GdyzVgGUeT/91A68Jg6xhoT6A2LHaO2hGPBeEOxzbn8ipBtTVqFvuYHz+uxogtEYhsDlYfcSAW0mZcWi8PPeJ/oXpPO+EWkeAlGYthVHxyqx7MveERk6++zaIfsyiuTHAAAAFQCRw5w/NvpcYdn2+DzLCIml7nQLAQAAAIBBF/tD+Jo9Gfjdmq5SF3pbC+KupSP62Qi7p5XadlZiZcuWoVAoTLhN6OXtaTLOvY5Ji9tcvOjtM3EsqhaivqKmzSmFg88zJeV3XiuO6FPbgKuE7O4syEN24wOLTfbAMhkbhj4rsSVTw65+fxKPlaB7yvoA2aZWCYV/KesWF1gKeAAAAIEA3ucGJ93/Mx4q4eKRDxcWD3QzWyqpbRVRRV1Vmih9Ha/qC994nJFzDQIdjxDIT2Rk2AGzMqFEB68Zc3O+Wcsmz5eWWzEwFxaTwOGWTyDqsDRLm3fD+QYjnOwuxb0Kce+gWI8voWcqC9cyRm09jGzu2Ab3Bhtpg8JJ8L7gS3MRZK4=
        '
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:1: advance: 'AAAAB3NzaC1kc3MAAACBAPo8NITJeIj2N82z3ta4zjoxIMJiU6pbDzRqM3XoCiG0GdyzVgGUeT/91A68Jg6xhoT6A2LHaO2hGPBeEOxzbn8ipBtTVqFvuYHz+uxogtEYhsDlYfcSAW0mZcWi8PPeJ/oXpPO+EWkeAlGYthVHxyqx7MveERk6++zaIfsyiuTHAAAAFQCRw5w/NvpcYdn2+DzLCIml7nQLAQAAAIBBF/tD+Jo9Gfjdmq5SF3pbC+KupSP62Qi7p5XadlZiZcuWoVAoTLhN6OXtaTLOvY5Ji9tcvOjtM3EsqhaivqKmzSmFg88zJeV3XiuO6FPbgKuE7O4syEN24wOLTfbAMhkbhj4rsSVTw65+fxKPlaB7yvoA2aZWCYV/KesWF1gKeAAAAIEA3ucGJ93/Mx4q4eKRDxcWD3QzWyqpbRVRRV1Vmih9Ha/qC994nJFzDQIdjxDIT2Rk2AGzMqFEB68Zc3O+Wcsmz5eWWzEwFxaTwOGWTyDqsDRLm3fD+QYjnOwuxb0Kce+gWI8voWcqC9cyRm09jGzu2Ab3Bhtpg8JJ8L7gS3MRZK4=
        '
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:2: check options: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC8A6FGHDiWCSREAXCq6yBfNVr0xCVG2CzvktFNRpue+RXrGs/2a6ySEJQb3IYquw7HlJgu6fg3WIWhOmHCjfpG0PrL4CRwbqQ2LaPPXhJErWYejcD8Di00cF3677+G10KMZk9RXbmHtuBFZT98wxg8j+ZsBMqGM1+7yrWUvynswQ==
        '
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:2: advance: 'AAAAB3NzaC1yc2EAAAADAQABAAAAgQC8A6FGHDiWCSREAXCq6yBfNVr0xCVG2CzvktFNRpue+RXrGs/2a6ySEJQb3IYquw7HlJgu6fg3WIWhOmHCjfpG0PrL4CRwbqQ2LaPPXhJErWYejcD8Di00cF3677+G10KMZk9RXbmHtuBFZT98wxg8j+ZsBMqGM1+7yrWUvynswQ==
        '
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:3: check options: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID7d/uFLuDlRbBc4ZVOsx+GbHKuOrPtLHFvHsjWPwO+/
        '
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:3: advance: 'AAAAC3NzaC1lZDI1NTE5AAAAID7d/uFLuDlRbBc4ZVOsx+GbHKuOrPtLHFvHsjWPwO+/
        '
        debug1: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:4: matching key found: ECDSA SHA256:DbuSF5a8c3JMmpZ5WiK8oLAx97Uu8zIAFReb/NyTPuo
        debug1: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:4: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
        Accepted key ECDSA SHA256:DbuSF5a8c3JMmpZ5WiK8oLAx97Uu8zIAFReb/NyTPuo found at /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:4
        debug1: restore_uid: (unprivileged)
        debug2: userauth_pubkey: authenticated 0 pkalg ecdsa-sha2-nistp256 [preauth]
        Postponed publickey for rkinsey from UNKNOWN port 65535 ssh2 [preauth]
        debug1: userauth-request for user rkinsey service ssh-connection method publickey [preauth]
        debug1: attempt 2 failures 0 [preauth]
        debug2: input_userauth_request: try method publickey [preauth]
        debug1: temporarily_use_uid: 501/20 (e=501/20)
        debug1: trying public key file /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys
        debug1: fd 6 clearing O_NONBLOCK
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:1: check options: 'ssh-dss AAAAB3NzaC1kc3MAAACBAPo8NITJeIj2N82z3ta4zjoxIMJiU6pbDzRqM3XoCiG0GdyzVgGUeT/91A68Jg6xhoT6A2LHaO2hGPBeEOxzbn8ipBtTVqFvuYHz+uxogtEYhsDlYfcSAW0mZcWi8PPeJ/oXpPO+EWkeAlGYthVHxyqx7MveERk6++zaIfsyiuTHAAAAFQCRw5w/NvpcYdn2+DzLCIml7nQLAQAAAIBBF/tD+Jo9Gfjdmq5SF3pbC+KupSP62Qi7p5XadlZiZcuWoVAoTLhN6OXtaTLOvY5Ji9tcvOjtM3EsqhaivqKmzSmFg88zJeV3XiuO6FPbgKuE7O4syEN24wOLTfbAMhkbhj4rsSVTw65+fxKPlaB7yvoA2aZWCYV/KesWF1gKeAAAAIEA3ucGJ93/Mx4q4eKRDxcWD3QzWyqpbRVRRV1Vmih9Ha/qC994nJFzDQIdjxDIT2Rk2AGzMqFEB68Zc3O+Wcsmz5eWWzEwFxaTwOGWTyDqsDRLm3fD+QYjnOwuxb0Kce+gWI8voWcqC9cyRm09jGzu2Ab3Bhtpg8JJ8L7gS3MRZK4=
        '
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:1: advance: 'AAAAB3NzaC1kc3MAAACBAPo8NITJeIj2N82z3ta4zjoxIMJiU6pbDzRqM3XoCiG0GdyzVgGUeT/91A68Jg6xhoT6A2LHaO2hGPBeEOxzbn8ipBtTVqFvuYHz+uxogtEYhsDlYfcSAW0mZcWi8PPeJ/oXpPO+EWkeAlGYthVHxyqx7MveERk6++zaIfsyiuTHAAAAFQCRw5w/NvpcYdn2+DzLCIml7nQLAQAAAIBBF/tD+Jo9Gfjdmq5SF3pbC+KupSP62Qi7p5XadlZiZcuWoVAoTLhN6OXtaTLOvY5Ji9tcvOjtM3EsqhaivqKmzSmFg88zJeV3XiuO6FPbgKuE7O4syEN24wOLTfbAMhkbhj4rsSVTw65+fxKPlaB7yvoA2aZWCYV/KesWF1gKeAAAAIEA3ucGJ93/Mx4q4eKRDxcWD3QzWyqpbRVRRV1Vmih9Ha/qC994nJFzDQIdjxDIT2Rk2AGzMqFEB68Zc3O+Wcsmz5eWWzEwFxaTwOGWTyDqsDRLm3fD+QYjnOwuxb0Kce+gWI8voWcqC9cyRm09jGzu2Ab3Bhtpg8JJ8L7gS3MRZK4=
        '
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:2: check options: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC8A6FGHDiWCSREAXCq6yBfNVr0xCVG2CzvktFNRpue+RXrGs/2a6ySEJQb3IYquw7HlJgu6fg3WIWhOmHCjfpG0PrL4CRwbqQ2LaPPXhJErWYejcD8Di00cF3677+G10KMZk9RXbmHtuBFZT98wxg8j+ZsBMqGM1+7yrWUvynswQ==
        '
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:2: advance: 'AAAAB3NzaC1yc2EAAAADAQABAAAAgQC8A6FGHDiWCSREAXCq6yBfNVr0xCVG2CzvktFNRpue+RXrGs/2a6ySEJQb3IYquw7HlJgu6fg3WIWhOmHCjfpG0PrL4CRwbqQ2LaPPXhJErWYejcD8Di00cF3677+G10KMZk9RXbmHtuBFZT98wxg8j+ZsBMqGM1+7yrWUvynswQ==
        '
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:3: check options: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID7d/uFLuDlRbBc4ZVOsx+GbHKuOrPtLHFvHsjWPwO+/
        '
        debug2: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:3: advance: 'AAAAC3NzaC1lZDI1NTE5AAAAID7d/uFLuDlRbBc4ZVOsx+GbHKuOrPtLHFvHsjWPwO+/
        '
        debug1: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:4: matching key found: ECDSA SHA256:DbuSF5a8c3JMmpZ5WiK8oLAx97Uu8zIAFReb/NyTPuo
        debug1: /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:4: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
        Accepted key ECDSA SHA256:DbuSF5a8c3JMmpZ5WiK8oLAx97Uu8zIAFReb/NyTPuo found at /var/folders/7r/7f75x7754mn6jj2617b484780000gn/T/sshtest203794432/authorized_keys:4
        debug1: restore_uid: (unprivileged)
        debug1: auth_activate_options: setting new authentication options
        Accepted publickey for rkinsey from UNKNOWN port 65535 ssh2: ECDSA SHA256:DbuSF5a8c3JMmpZ5WiK8oLAx97Uu8zIAFReb/NyTPuo
        debug1: monitor_child_preauth: rkinsey has been authenticated by privileged process
        debug1: auth_activate_options: setting new authentication options [preauth]
        debug2: userauth_pubkey: authenticated 1 pkalg ecdsa-sha2-nistp256 [preauth]
        debug1: monitor_read_log: child log fd closed
        BSM audit: bsm_audit_session_setup: setaudit_addr failed: Invalid argument
        User child is on pid 82066
        debug2: set_newkeys: mode 0
        debug1: rekey after 4294967296 blocks
        debug2: set_newkeys: mode 1
        debug1: rekey after 4294967296 blocks
        debug1: ssh_packet_set_postauth: called
        debug1: active: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
        debug1: Entering interactive session for SSH2.
        debug2: fd 11 setting O_NONBLOCK
        debug2: fd 12 setting O_NONBLOCK
        debug1: server_init_dispatch
        debug1: server_input_channel_open: ctype session rchan 0 win 2097152 max 32768
        debug1: input_session_request
        debug1: channel 0: new [server-session]
        debug2: session_new: allocate (allocated 0 max 10)
        debug1: session_new: session 0
        debug1: session_open: channel 0
        debug1: session_open: session 0: link with channel 0
        debug1: server_input_channel_open: confirm session
        debug1: server_input_channel_req: channel 0 request pty-req reply 1
        debug1: session_by_channel: session 0 channel 0
        debug1: session_input_channel_req: session 0 req pty-req
        debug1: Allocating pty.
        debug2: session_new: allocate (allocated 0 max 10)
        debug1: session_new: session 0
        Attempt to write login records by non-root user (aborting)
        debug1: session_pty_req: session 0 alloc /dev/ttys002
        debug1: server_input_channel_req: channel 0 request shell reply 1
        debug1: session_by_channel: session 0 channel 0
        debug1: session_input_channel_req: session 0 req shell
        Starting session: shell on ttys002 for rkinsey from UNKNOWN port 65535 id 0
        debug2: channel 0: rfd 15 isatty
        debug2: fd 15 setting O_NONBLOCK
        debug1: Setting controlling tty using TIOCSCTTY.
        debug2: channel 0: rcvd adjust 39
        debug2: channel 0: rcvd adjust 35
        debug2: channel 0: rcvd adjust 64
        debug2: channel 0: rcvd adjust 51
        debug2: channel 0: rcvd adjust 17
        debug2: channel 0: rcvd adjust 11
        debug2: channel 0: rcvd adjust 664
        debug1: Received SIGCHLD.
        debug1: session_by_pid: pid 82067
        debug1: session_exit_message: session 0 channel 0 pid 82067
        debug2: channel 0: request exit-status confirm 0
        debug1: session_exit_message: release channel 0
        debug2: channel 0: write failed
        debug2: channel 0: chan_shutdown_write (i0 o0 sock -1 wfd 13 efd -1 [closed])
        debug2: channel 0: send eow
        debug2: channel 0: output open -> closed
        debug2: channel 0: read<=0 rfd 15 len 0
        debug2: channel 0: read failed
        debug2: channel 0: chan_shutdown_read (i0 o3 sock -1 wfd 15 efd -1 [closed])
        debug2: channel 0: input open -> drain
        debug2: channel 0: ibuf empty
        debug2: channel 0: send eof
        debug2: channel 0: input drain -> closed
        debug2: channel 0: send close
        debug2: notify_done: reading
        debug1: session_by_tty: session 0 tty /dev/ttys002
        debug1: session_pty_cleanup2: session 0 release /dev/ttys002
        Attempt to write login records by non-root user (aborting)
        debug2: channel 0: rcvd close
        debug2: channel 0: is dead
        debug2: channel 0: gc: notify user
        debug1: session_by_channel: session 0 channel 0
        debug1: session_close_by_channel: channel 0 child 0
        Close session: user rkinsey from UNKNOWN port 65535 id 0
        debug2: channel 0: gc: user detached
        debug2: channel 0: is dead
        debug2: channel 0: garbage collecting
        debug1: channel 0: free: server-session, nchannels 1
        Connection closed by UNKNOWN port 65535
        debug1: do_cleanup
        Transferred: sent 4172, received 1568 bytes
        Closing connection to UNKNOWN port 65535
FAIL
FAIL    golang.org/x/crypto/ssh/test    5.010s
FAIL
This happens when the login shell is zsh or tcsh (and csh on Mac because csh==tcsh). It seems like they both reset the terminal settings when control is returned after a command, so the changes are never seen by the `stty -a` call.
@gopherbot gopherbot added this to the Unreleased milestone Mar 23, 2020
@dmitshur

This comment has been minimized.

Copy link
Member

@dmitshur dmitshur commented Mar 23, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.