Open Wulfaz opened 1 year ago
Thanks for submitting @Wulfaz , It may be an issue with the different version of SSH on the remote servers, if they are on the same version does the issue persist?
Hello @dannyneira,
Thank you for you answer! I'll share with you a Loom video of my testings. Nota: everything is fine on all my servers if I'm not using the Warp SSH wrapper!
Some info: 1) the sshd on the 1st server (named "karotz") is a Dropbear v2014.66 on a Busybox v1.24.0 (on an ARMv4TL: Linux karotz 2.6.28-pragmatec -g53e06b1-dirty #1 Tue May 31 17:50:18 CEST 2011 armv4tl GNU/Linux) Quite old and not powerfull (that's why I cannot change the sshd on this device) - without the SSH wrapper everything is fine: I can even connect via my rsa key => command "ssh karotz" with options -v, -vv or even -vvv are still not able to connect 2) the sshd on the 2nd server (named "nabaztag") is a OpenSSH_7.9p1 on Raspbian-10+deb10u2+rpt1 (Raspberry PI W) => command "ssh nabaztag" with option -v, -vv or -vvv cause some trouble you can see in the following loom video.
Here the Loom video link: https://www.loom.com/share/4e023439364842d28e12ba4428a50e12
Thanks again Danny
Not sure if this is the same issue, or not. When I connect to ssh server, the default shell for the server uses nushell. This causes ssh connection to close immediately. Running from macos terminal everything works as expected. Guessing warp tries running some scripts, and the "export" keyword triggers the closing.
debug1: Sending command: export TERM_PROGRAM='WarpTerminal'
_user="$(command -v whoami >/dev/null 2>&1 && command whoami 2>/dev/null || echo $USER)"
_hostname="$(command -v hostname >/dev/null 2>&1 && command hostname 2>/dev/null || uname -n)"
hook=$(printf "{\\"hook\\": \\"SSH\\", \\"value\\": {\\"socket_path\\": \\"~/.ssh/16771139233948\\", \\"user\\": \\"%s\\", \\"host\\": \\"%s\\", \\"remote_shell\\": \\"%s\\"}}" "$_user" "$_hostname" "${SHELL##*/}" | command od -An -v -tx1 | command tr -d " \\n")
printf '\033P$d%s\234' $hook
if test "${SHELL##*/}" != "bash" -a "${SHELL##*/}" != "zsh"; then
exec $SHELL
fi
case ${SHELL##*/} in
bash) exec -a bash bash --rcfile <(echo 'set -o vi; set +o vi; HISTCONTROL=ignorespace; HISTIGNORE=" *"; printf '\\''\033P$d7b22686f6f6b223a2022496e69745368656c6c222c202276616c7565223a207b227368656c6c223a202262617368227d7d\234'\\''')
;;
zsh) WARP_TMP_DIR=$(mktemp -d warptmp.XXXXXX)
local ZSH_ENV_SCRIPT='75
debug2: channel 1: request exec confirm 1 debug3: send packet: type 98 debug2: channel_input_open_confirmation: channel 1: callback done debug2: channel 1: open confirm rwindow 0 rmax 32768 debug3: receive packet: type 81 debug1: client_global_hostkeys_private_confirm: server used untrusted RSA signature algorithm ssh-rsa for key 0, disregarding debug3: hostkeys_foreach: reading file "/Users/scott/.ssh/known_hosts" debug3: host_delete: ED25519 key already at /Users/scott/.ssh/known_hosts:15 debug3: host_delete: ECDSA key already at /Users/scott/.ssh/known_hosts:16 debug1: update_known_hosts: known hosts file /Users/scott/.ssh/known_hosts2 does not exist debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 1 debug2: PTY allocation request accepted on channel 1 debug2: channel 1: rcvd adjust 2097152 debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 1 debug2: exec request accepted on channel 1
Error: nu::parser::unexpected_keyword (link)
× Unexpected keyword. ╭─[source:1:1] 1 │ 2 │ export · ───┬── · ╰── unexpected export ╰──── help: 'export' keyword is allowed only in a module.
debug3: receive packet: type 96 debug2: channel 1: rcvd eof debug2: channel 1: output open -> drain debug2: channel 1: obuf empty debug2: chan_shutdown_write: channel 1: (i0 o1 sock -1 wfd 6 efd 7 [write]) debug2: channel 1: output drain -> closed debug3: receive packet: type 98 debug1: client_input_channel_req: channel 1 rtype exit-status reply 0 debug3: receive packet: type 98 debug1: client_input_channel_req: channel 1 rtype eow@openssh.com reply 0 debug2: channel 1: rcvd eow debug2: chan_shutdown_read: channel 1: (i0 o3 sock -1 wfd 5 efd 7 [write]) debug2: channel 1: input open -> closed debug3: receive packet: type 97 debug2: channel 1: rcvd close debug3: channel 1: will not send data after close debug2: channel 1: almost dead debug2: channel 1: gc: notify user debug2: channel 1: gc: user detached debug2: channel 1: send close debug3: send packet: type 97 debug2: channel 1: is dead debug2: channel 1: garbage collecting debug1: channel 1: free: client-session, nchannels 2 debug3: channel 1: status: The following connections are open:
debug3: send packet: type 1 debug1: channel 0: free: /Users/scott/.ssh/16771139233948, nchannels 1 debug3: channel 0: status: The following connections are open:
Connection to 192.168.1.94 closed.
This issue seems to be with verbose of debug log levels when connecting to ssh, the logging info seems to be carrying over into the input editor.
Discord username (optional)
Lionel Caillis#7645
Local Shell and Version
zsh 5.8.1
Remote Shell and Version
bash 4.1.0(1)-release, bash 5.0.3(1)-release
Operating System and Version
macOS Ventura 13.1
Warp Version
v0.2023.01.24.08.03.stable_01
I have tried commenting out my system & user rcfiles and warp still will not bootstrap
Screenshots
Screenshot are hard to catch because with one of those option some script lines are run just like commands on the prompt.
Below is the xtrace output of the oldest of my servers because on my youngest ones the output is too long (seems to be an infinite loop) Using Warp it's strictly impossible To this server with any of -v, -vv, -vvv or none of these options. The resut is always the same : "exec request failed on channel 1"
Include shell xtrace output
==============Command=============== $ssh karotz -vv ============SSH config file============== Host AddKeysToAgent yes UseKeychain yes SendEnv -LC -LANG*
Host karotz karotz.local HostName 10.1.16.4 User karotz IdentityFile ~/.ssh/id_rsa PubkeyAcceptedKeyTypes +ssh-rsa ===============Result================= OpenSSH_9.0p1, LibreSSL 3.3.6 debug1: Reading configuration data /Users/lionel/.ssh/config debug1: /Users/lionel/.ssh/config line 1: Applying options for debug1: /Users/lionel/.ssh/config line 16: Applying options for karotz debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/ matched no files debug1: /etc/ssh/ssh_config line 54: Applying options for * debug2: resolve_canonicalize: hostname 10.1.16.4 is address debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling debug1: Connecting to 10.1.16.4 [10.1.16.4] port 22. debug1: Connection established. debug1: identity file /Users/lionel/.ssh/id_rsa type 0 debug1: identity file /Users/lionel/.ssh/id_rsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_9.0 debug1: Remote protocol version 2.0, remote software version dropbear_2014.66 debug1: compat_banner: no match: dropbear_2014.66 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to 10.1.16.4:22 as 'karotz' debug1: load_hostkeys: fopen /Users/lionel/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: local client KEXINIT proposal debug2: KEX algorithms: sntrup761x25519-sha512@openssh.com,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,ext-info-c debug2: host key algorithms: ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,rsa-sha2-512,rsa-sha2-256 debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com 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 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 debug2: compression ctos: none,zlib@openssh.com,zlib debug2: compression stoc: none,zlib@openssh.com,zlib debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug2: peer server KEXINIT proposal debug2: KEX algorithms: curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,kexguess2@matt.ucc.asn.au debug2: host key algorithms: ecdsa-sha2-nistp521,ssh-rsa,ssh-dss debug2: ciphers ctos: aes128-ctr,3des-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes256-cbc,twofish256-cbc,twofish-cbc,twofish128-cbc debug2: ciphers stoc: aes128-ctr,3des-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes256-cbc,twofish256-cbc,twofish-cbc,twofish128-cbc debug2: MACs ctos: hmac-sha1-96,hmac-sha1,hmac-md5 debug2: MACs stoc: hmac-sha1-96,hmac-sha1,hmac-md5 debug2: compression ctos: zlib,zlib@openssh.com,none debug2: compression stoc: zlib,zlib@openssh.com,none debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ecdsa-sha2-nistp521 debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1 compression: none debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1 compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ecdsa-sha2-nistp521 SHA256:LnKfsg61XOVWBgAef6SMyeak+tdMWb1YWQn1eO+L9fg debug1: load_hostkeys: fopen /Users/lionel/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host '10.1.16.4' is known and matches the ECDSA host key. debug1: Found key in /Users/lionel/.ssh/known_hosts:14 debug2: ssh_set_newkeys: mode 1 debug1: rekey out after 4294967296 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug2: ssh_set_newkeys: mode 0 debug1: rekey in after 4294967296 blocks debug1: get_agent_identities: bound agent to hostkey debug1: get_agent_identities: agent returned 2 keys debug1: Will attempt key: /Users/lionel/.ssh/id_rsa RSA SHA256:PFAWp0KzUlumRmcygajiCd1JkHYDjuk7Z75IJozedEI explicit agent debug1: Will attempt key: wulfaz.net@gmail.com ED25519 SHA256:bO2tpuEY8VNlpFi082UtswYLDfSuY2Dz0SRtJbTogLM agent debug2: pubkey_prepare: done debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: /Users/lionel/.ssh/id_rsa RSA SHA256:PFAWp0KzUlumRmcygajiCd1JkHYDjuk7Z75IJozedEI explicit agent debug2: we sent a publickey packet, wait for reply debug1: Server accepts key: /Users/lionel/.ssh/id_rsa RSA SHA256:PFAWp0KzUlumRmcygajiCd1JkHYDjuk7Z75IJozedEI explicit agent Authenticated to 10.1.16.4 ([10.1.16.4]:22) using "publickey". debug1: setting up multiplex master socket debug2: fd 4 setting O_NONBLOCK debug1: channel 0: new [/Users/lionel/.ssh/16753459308528] debug1: channel 1: new [client-session] debug2: channel 1: send open debug1: Entering interactive session. debug1: pledge: id debug2: channel_input_open_confirmation: channel 1: callback start debug2: fd 3 setting TCP_NODELAY debug2: client_session2_setup: id 1 debug2: channel 1: request pty-req confirm 1 debug1: Sending environment. debug1: channel 1: setting env LC_CTYPE = "UTF-8" debug2: channel 1: request env confirm 0 debug1: Sending command: export TERM_PROGRAM='WarpTerminal'
if test "${SHELL##/}" != "bash" -a "${SHELL##/}" != "zsh"; then exec $SHELL fi
debug2: channel 1: request exec confirm 1 debug2: channel_input_open_confirmation: channel 1: callback done debug2: channel 1: open confirm rwindow 24576 rmax 32759 debug2: channel_input_status_confirm: type 99 id 1 debug2: PTY allocation request accepted on channel 1 debug2: channel_input_status_confirm: type 100 id 1 exec request failed on channel 1
Does this block you from using Warp daily?
Yes, this issue prevents me from using Warp daily.
Warp Internal (ignore) - linear-label:e7dfaa84-5fdb-4a00-b754-d8912da923fa
None
Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e
None