ssh – Terminal caught at each launch till Ctrl+C

[ad_1]

Each time I efficiently login to a distant server utilizing ssh, the zsh terminal would caught except I do a Ctrl+C. There is no drawback with the ssh login. It additionally requires three Ctrl+C after I kind exit for it to essentially exit the ssh connection each time.

To see if something’s incorrect with ~/.zshenv or ~/.zshrc, I commented out all of their content material and added echo "Finish of ~/.zshenv" on the finish of ~/.zshenv, and echo "Finish of ~/.zshrc" on the finish of ~/.zshrc, the output of is as following:

Final login: Thu Aug  1 00:13:12 2024 from XX.XX.XXX.XXX
+/u/username/.zshenv:159> echo 'Finish of ~/.zshenv'
Finish of ~/.zshenv
+/and many others/zprofile:6> [ -x /usr/libexec/path_helper ']'
+/and many others/zprofile:7> /usr/libexec/path_helper -s
+/and many others/zprofile:7> eval 'PATH="/usr/native/bin:/usr/bin:/bin:/usr/sbin:/sbin:/choose/X11/bin:/Library/Apple/usr/bin";' export 'PATH;'
+(eval):1> PATH=/usr/native/bin:/usr/bin:/bin:/usr/sbin:/sbin:/choose/X11/bin:/Library/Apple/usr/bin
+(eval):1> export PATH
+/and many others/zshrc:7> [[+/etc/zshrc:7> locale LC_CTYPE
+/etc/zshrc:7> [[ US-ASCII == UTF-8 ]]
+/and many others/zshrc:12> disable log
+/and many others/zshrc:15> HISTFILE=/u/username/.zsh_history
+/and many others/zshrc:16> HISTSIZE=2000
+/and many others/zshrc:17> SAVEHIST=1000
+/and many others/zshrc:20> setopt BEEP
+/and many others/zshrc:24> [[ -r /u/username/.zkbd/xterm-256color-apple ]]
+/and many others/zshrc:27> typeset -g -A key
+/and many others/zshrc:29> [[ -n $'C-[OP' ]]
+/and many others/zshrc:29> key[F1]=$'C-[OP'
+/etc/zshrc:30> [[ -n $'C-[OQ' ]]
+/and many others/zshrc:30> key[F2]=$'C-[OQ'
+/etc/zshrc:31> [[ -n $'C-[OR' ]]
+/and many others/zshrc:31> key[F3]=$'C-[OR'
+/etc/zshrc:32> [[ -n $'C-[OS' ]]
+/and many others/zshrc:32> key[F4]=$'C-[OS'
+/etc/zshrc:33> [[ -n $'C-[[15~' ]]
+/and many others/zshrc:33> key[F5]=$'C-[[15~'
+/etc/zshrc:34> [[ -n $'C-[[17~' ]]
+/and many others/zshrc:34> key[F6]=$'C-[[17~'
+/etc/zshrc:35> [[ -n $'C-[[18~' ]]
+/and many others/zshrc:35> key[F7]=$'C-[[18~'
+/etc/zshrc:36> [[ -n $'C-[[19~' ]]
+/and many others/zshrc:36> key[F8]=$'C-[[19~'
+/etc/zshrc:37> [[ -n $'C-[[20~' ]]
+/and many others/zshrc:37> key[F9]=$'C-[[20~'
+/etc/zshrc:38> [[ -n $'C-[[21~' ]]
+/and many others/zshrc:38> key[F10]=$'C-[[21~'
+/etc/zshrc:39> [[ -n $'C-[[23~' ]]
+/and many others/zshrc:39> key[F11]=$'C-[[23~'
+/etc/zshrc:40> [[ -n $'C-[[24~' ]]
+/and many others/zshrc:40> key[F12]=$'C-[[24~'
+/etc/zshrc:41> [[ -n $'C-[[1;2P' ]]
+/and many others/zshrc:41> key[F13]=$'C-[[1;2P'
+/etc/zshrc:42> [[ -n $'C-[[1;2Q' ]]
+/and many others/zshrc:42> key[F14]=$'C-[[1;2Q'
+/etc/zshrc:43> [[ -n $'C-[[1;2R' ]]
+/and many others/zshrc:43> key[F15]=$'C-[[1;2R'
+/etc/zshrc:44> [[ -n $'C-[[1;2S' ]]
+/and many others/zshrc:44> key[F16]=$'C-[[1;2S'
+/etc/zshrc:45> [[ -n $'C-[[15;2~' ]]
+/and many others/zshrc:45> key[F17]=$'C-[[15;2~'
+/etc/zshrc:46> [[ -n $'C-[[17;2~' ]]
+/and many others/zshrc:46> key[F18]=$'C-[[17;2~'
+/etc/zshrc:47> [[ -n $'C-[[18;2~' ]]
+/and many others/zshrc:47> key[F19]=$'C-[[18;2~'
+/etc/zshrc:48> [[ -n $'C-[[19;2~' ]]
+/and many others/zshrc:48> key[F20]=$'C-[[19;2~'
+/etc/zshrc:49> [[ -n $'C-H' ]]
+/and many others/zshrc:49> key[Backspace]=$'C-H'
+/and many others/zshrc:50> [[ -n $'C-[[2~' ]]
+/and many others/zshrc:50> key[Insert]=$'C-[[2~'
+/etc/zshrc:51> [[ -n $'C-[[3~' ]]
+/and many others/zshrc:51> key[Delete]=$'C-[[3~'
+/etc/zshrc:52> [[ -n $'C-[OH' ]]
+/and many others/zshrc:52> key[Home]=$'C-[OH'
+/etc/zshrc:53> [[ -n $'C-[OF' ]]
+/and many others/zshrc:53> key[End]=$'C-[OF'
+/etc/zshrc:54> [[ -n $'C-[[5~' ]]
+/and many others/zshrc:54> key[PageUp]=$'C-[[5~'
+/etc/zshrc:55> [[ -n $'C-[[6~' ]]
+/and many others/zshrc:55> key[PageDown]=$'C-[[6~'
+/etc/zshrc:56> [[ -n $'C-[OA' ]]
+/and many others/zshrc:56> key[Up]=$'C-[OA'
+/etc/zshrc:57> [[ -n $'C-[OD' ]]
+/and many others/zshrc:57> key[Left]=$'C-[OD'
+/etc/zshrc:58> [[ -n $'C-[OB' ]]
+/and many others/zshrc:58> key[Down]=$'C-[OB'
+/etc/zshrc:59> [[ -n $'C-[OC' ]]
+/and many others/zshrc:59> key[Right]=$'C-[OC'
+/etc/zshrc:63> [[ -n $'C-[[3~' ]]
+/and many others/zshrc:63> bindkey $'C-[[3~' delete-char
+/etc/zshrc:64> [[ -n $'C-[OH' ]]
+/and many others/zshrc:64> bindkey $'C-[OH' beginning-of-line
+/etc/zshrc:65> [[ -n $'C-[OF' ]]
+/and many others/zshrc:65> bindkey $'C-[OF' end-of-line
+/etc/zshrc:66> [[ -n $'C-[OA' ]]
+/and many others/zshrc:66> bindkey $'C-[OA' up-line-or-search
+/etc/zshrc:67> [[ -n $'C-[OB' ]]
+/and many others/zshrc:67> bindkey $'C-[OB' down-line-or-search
+/etc/zshrc:70> PS1='%n@%m %1~ %# '
+/etc/zshrc:73> [ -r /etc/zshrc_ ']'
+/u/username/.zshrc:41> echo 'Finish of ~/.zshrc'
Finish of ~/.zshrc

After which it is caught till a Ctrl+C is shipped.
It does appear that ~/.zshenv and ~/.zshrc are completed executing however nonetheless in some way get caught after that. So the answer to this query doesn’t apply.

I additionally came upon that ZDOTDIR and USER_ZDOTDIR are each empty variables after Ctrl+C, regardless that the ~/.zshenv and ~/.zshrc are executed. Tried in vscode, and the issue persists. However ZDOTDIR, USER_ZDOTDIR, and VSCODE_ZDOTDIR are house listing in vscode. I am in determined want of any ideas that may assist fixing this subject! Admire it!

[ad_2]

Leave a Reply

Your email address will not be published. Required fields are marked *