With Terminal, you can execute interactive shell commands (CMD, PowerShell, SH) on a remote computer.
If the command execution gets stuck for some reason, you can click on a Reset terminal button to reset the shell.