Updated Troubleshooting Steps (markdown)

Manoj Ampalam 2018-01-21 00:13:55 -08:00
parent b95f38e95d
commit adb696e138

@ -1,18 +1,12 @@
If sshd won't start: Troubleshooting steps for typical service startup and connection issues:
* Ensure that `sshd_config` is in the same directory as `sshd.exe`
* Ensure that host keys are generated and have the [correct file permissions][Secure file]:
* Ensure that private host keys are [secured][Secure file]
* Ensure that `NT service\sshd` has `Read` access to public and private key files
Troubleshooting steps for typical connection issues:
* Server side: run `sshd` in debug mode * Server side: run `sshd` in debug mode
* `net stop sshd` * `Stop-Service sshd` (if sshd service is running)
* In an elevated Administrator console, run `sshd` in debug mode * Open cmd as SYSTEM. Download psexec from [here](https://docs.microsoft.com/en-us/sysinternals/downloads/psexec).
* `psexec -i -s cmd`
* `sshd.exe -d` * `sshd.exe -d`
* This will dump debug logs in real time to stdout on the console * This will dump debug logs in real time to stdout on the console
* You can also add additional `d`s to get more debug information: * You can also add additional `d`s for more detailed loggin:
* `sshd.exe -dd` or `sshd.exe -ddd` * `sshd.exe -dd` or `sshd.exe -ddd`
* Client side: start `ssh` in verbose mode * Client side: start `ssh` in verbose mode
* `ssh.exe -v ...` * `ssh.exe -v ...`
@ -22,11 +16,11 @@ Troubleshooting steps for typical connection issues:
Troubleshooting more complex issues: Troubleshooting more complex issues:
* Server side * Server side
* Stop `sshd` and `ssh-agent` services * Stop `sshd`
* `Get-Service ssh* | Stop-Service` * `Stop-Service sshd`
* Delete `sshd.log` and `ssh-agent.log` (in the `logs` directory of your installation path) * Delete `sshd.log` and `ssh-agent.log` (in the `logs` directory of your installation path)
* Set `LogLevel` to `DEBUG` (or `DEBUG2`/`DEBUG3` for higher levels of logging) in `sshd_config` * Set `LogLevel` to `DEBUG` (or `DEBUG2`/`DEBUG3` for higher levels of logging) in `sshd_config`
* Rerun the workflow that's giving you problems. `logs\sshd.log` and `logs\ssh-agent.log` will contain `sshd` and `ssh-agent` related traces respectively. * Rerun the workflow that's giving you problems. `logs\sshd.log` will contain `sshd` related traces.
* If the problem isn't clear, please post these logs along with some steps to help us reproduce your problem in [our GitHub Issues](https://github.com/powershell/Win32-OpenSSH/issues). * If the problem isn't clear, please post these logs along with some steps to help us reproduce your problem in [our GitHub Issues](https://github.com/powershell/Win32-OpenSSH/issues).
* Client side * Client side
* Set `LogLevel` to `DEBUG` (or `DEBUG2`/`DEBUG3` for higher levels of logging) in `ssh_config`. * Set `LogLevel` to `DEBUG` (or `DEBUG2`/`DEBUG3` for higher levels of logging) in `ssh_config`.