Skip to content

ssh kitten fails when $KITTY_PUBLIC_KEY contains a backtick (`) #5496

Description

@morgan-greywolf

When the value of $KITTY_PUBLIC_KEY contains a a backtick (`), and the remote server executes bootstrap.sh, the following error is printed and the shared remote connection drops:
: 8: /home/user/.kitty-ssh-kitten-untar-4wL3BHIP7aML/data.sh: Syntax error: Unterminated quoted stringre

the second line of /home/user/.kitty-ssh-kitten-untar-4wL3BHIP7aML/data.sh on the remote server ends up attempting to set KITTY_PUBLIC_KEY, but the backtick is not properly escaped for bash/dash.

This is the contents of data.sh:

export KITTY_PUBLICexport COLORTERM="truecolor"
export KITTY_PUBLIC_KEY="1:E$H(!Q5w-${iAV1ADIS{Bjb^7>N3qSZ~Ie2a5Q\`~"
export KITTY_REMOTE="if-needed"
export KITTY_SHELL_INTEGRATION="enabled"
export KITTY_SSH_KITTEN_DATA_DIR=".local/share/kitty-ssh-kitten"
export KITTY_WINDOW_ID="28"
export TERM="xterm-256color"
export WINDOWID="100663310"_KEY="1:E$H(!Q5w-${iAV1ADIS{Bjb^7>N3qSZ~Ie2a5Q\`~"
export KITTY_REMOTE="if-needed"
export KITTY_SHELL_INTEGRATION="enabled"
export KITTY_SSH_KITTEN_DATA_DIR=".local/share/kitty-ssh-kitten"
export KITTY_WINDOW_ID="28"
export TERM="xterm-256color"
export WINDOWID="100663310"```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions