Teleport does not support non-interactive interactive SSH sessions. A non-interactive interactive session is a "shell" session where a PTY is not allocated. Teleport correctly supports interactive and non-interactive "exec" sessions.
Follow the below steps to create a non-interactive interactive session with OpenSSH.
First generate host keys, user keys, and authorized_keys file.
Then request an interactive session ("shell") but do not request a PTY with the -T flag. A PTY will not be allocated but an interactive session will be created.
$ ssh -T 127.0.0.1 \
-o Port=2022 \
-o IdentityFile=$DIR/ssh_user_ecdsa_key \
-o UserKnownHostsFile=/dev/null \
-o StrictHostKeyChecking=no
Warning: Permanently added '[127.0.0.1]:2022' (ED25519) to the list of known hosts.
tty
not a tty
exit
However, with Teleport a PTY is allocated for interactive ("shell") sessions even if the user specifically requests one is not allocated.
$ tsh ssh -T server01
~ $ tty
/dev/ttys007
~ $ exit
the connection was closed on the remote side at 25 Oct 24 16:48 PDT
Teleport does not support non-interactive interactive SSH sessions. A non-interactive interactive session is a "shell" session where a PTY is not allocated. Teleport correctly supports interactive and non-interactive "exec" sessions.
Follow the below steps to create a non-interactive interactive session with OpenSSH.
First generate host keys, user keys, and
authorized_keys
file.Start a SSH server in the foreground on port
2022
:Then request an interactive session ("shell") but do not request a PTY with the
-T
flag. A PTY will not be allocated but an interactive session will be created.However, with Teleport a PTY is allocated for interactive ("shell") sessions even if the user specifically requests one is not allocated.