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.
Incorrect. Ctrl+C sends an interrupt to the foreground command.
Correct. Ctrl+D sends EOF to an input-waiting shell.
Correct. Ctrl+D sends EOF to an input-waiting shell.
Incorrect. Ctrl+Z suspends the foreground job.
Incorrect. Ctrl+Z suspends the foreground job.
Incorrect. Ctrl+L redraws or clears the terminal display.
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
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.