An interactive SSH login shell is waiting for command input.
Send end-of-file to terminate the shell normally.
Which key sequence is commonly used?
Ctrl+D sends EOF when an interactive shell is waiting for input. With an empty input line, the shell exits and the SSH session closes.
Detailed explanation
Incorrect. Ctrl+C sends an interrupt to the foreground command.
Correct. Ctrl+D sends EOF to an input-waiting shell.
Incorrect. Ctrl+Z suspends the foreground job.
Incorrect. Ctrl+L redraws or clears the terminal display.
Try it yourself
An example you can run in a temporary verification environment.
bind -q end-of-fileExpected result
Bash readlineのend-of-file割り当て情報Key points
- Ctrl+D
- EOF
- Normal disconnect
Notes
- Environment: Bash 5.2/OpenSSH 9.x
- Use a disposable VM or test account when validating installation and SSH behavior.
- Exact command output can vary slightly by distribution and OpenSSH version.
Foundation review
Identify the scope
Interrupt, suspend, screen-control, and end-of-file signals have distinct terminal meanings.
Check the side effect
If a line already contains text, understand that Ctrl+D may first deliver the pending input instead of exiting.