Skip to content

error: fork: No such file or directory #451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pvdhoef opened this issue Dec 21, 2016 · 1 comment
Closed

error: fork: No such file or directory #451

pvdhoef opened this issue Dec 21, 2016 · 1 comment

Comments

@pvdhoef
Copy link

pvdhoef commented Dec 21, 2016

When trying to ssh to a machine with Win32-OpenSSH v0.0.5.0 installed I get:

ssh_exchange_identification: Connection closed by remote host

And in logs\sshd:

2408 11:42:39 421 Server listening on :: port 22.
2408 11:42:39 421 Server listening on 0.0.0.0 port 22.
2408 11:42:39 421 error: Couldn't create pid file "./sshd.pid": Permission denied
2408 11:43:34 999 error: fork: No such file or directory

Tried to set r/w permissions on C:\Program Files\OpenSSH-Win64 for NT SERVICE\sshd but that didn't help.

After stopping the sshd service and starting it from the command line with sshd.exe -d I was able to ssh to the machine:

debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: socket:532, io:000001FC6FC8F970, fd:4
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: socket:536, io:000001FC6FC91100, fd:5
debug1: pipe - r-h:540,io:000001FC6FC42530,fd:6  w-h:544,io:000001FC6FC95500,fd:7
debug1: Server will not fork when running in debugging mode.
... etc

The message Server will not fork when running in debugging mode explains maybe why the error: fork: No such file or directory did not occur this time.

Workaround

As suggested by @manojampalam, this may have been caused by whitespace characters in the installation directory path.
When installed in C:\OpenSSH-Win64 (instead of C:\Program Files\OpenSSH-Win64) it is indeed possible to ssh to the machine again.

The message error: Couldn't create pid file "./sshd.pid": Permission denied still shows up in the log file but that appears to be rather harmless.

@manojampalam
Copy link
Contributor

dup #493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants