SSH错误。安装服务时出错:CreateService:Win32错误1057

某事

ssh-host-config无法正常工作,将sshd作为服务创建时出现此错误。我运行的是安装了cygwin的Windows 7 32位。

安装cygwin之后,它最初是可以工作的。我做了ssh-host-config几次。我想确保更改ssh和sshd的配置,所以我将其卸载了。不记得有没有错误。在卸载和重新安装时,我使用了这些说明。

我按照站点上的说明进行操作,并怀疑更改这些目录的权限会弄乱我的系统。在某个地方,我不记得在哪里,我看到了关于所有权的错误/警告消息,它会使事情搞砸。也许这是我不知道的好教程。

这是错误:

/usr/bin/cygrunsrv: Error installing a service: CreateService:  Win32 error 1057

这是ssh-host-config:

 ~
$ ssh-host-config -y

*** Query: Overwrite existing /etc/ssh_config file? (yes/no) yes
*** Info: Creating default /etc/ssh_config file
*** Query: Overwrite existing /etc/sshd_config file? (yes/no) yes
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Warning: sshd is in /etc/passwd, but the
*** Warning: local machine's SAM does not know about sshd.
*** Warning: Perhaps sshd is a pre-existing domain account.
*** Warning: Continuing, but check if this is ok.
*** Info: Updating /etc/sshd_config file
*** Query: Overwrite existing /etc/inetd.d/sshd-inetd file? (yes/no) yes
*** Info: Creating default /etc/inetd.d/sshd-inetd file
*** Info: Updated /etc/inetd.d/sshd-inetd

*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: []
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires.  You need to have or to create a privileged
*** Info: account.  This script will help you do so.

*** Warning: cyg_server is in /etc/passwd, but the local
*** Warning: machine's SAM does not know about cyg_server.
*** Warning: Perhaps cyg_server is a pre-existing domain account.
*** Warning: Continuing, but check if this is ok.
*** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
*** Info: or later.  On these systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd).

*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar account
*** Info: already exists). This account is then used to run these special
*** Info: servers.

*** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself.

*** Info: The following privileged accounts were found: 'cyg_server' .

*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Please enter the password for user 'cyg_server':
*** Query: Reenter:
*** Query: Please enter the password for user 'cyg_server':
*** Query: Reenter:

/usr/bin/cygrunsrv: Error installing a service: CreateService:  Win32 error 1057:
The account name is invalid or does not exist, or the password is invalid for the account name specified.

*** ERROR: Installing sshd as a service failed!

*** Warning: Host configuration exited with 1 errors or warnings!
*** Warning: Make sure that all problems reported are fixed,
*** Warning: then re-run ssh-host-config.

我试图重新安装openssh和cygrunsrv,但仍无济于事。

如何删除ssh,sshd和cygrunsrv的所有配置文件?如何获得ssh作为服务安装sshd?有任何想法吗?感谢克里斯蒂安(Kristjan)

某事

我按照线程答案中的说明进行操作

摘抄:

For Windows XP.
To remove Cygwin sshd in the cleanest possible way:

Disclaimer

cygrunsrv -E sshd

cygrunsrv -R sshd

delete the folder c:\cygwin and all its sub-folders

remove the Environment Variable CYGWIN

edit the Environment path accordingly

Start...Run... regedit and delete these two registry trees

"HKEY_CURRENT_USER_Software_Cygnus Solutions"

"HKEY_LOCAL_MACHINE_Software_Cygnus Solutions"

Go to Control Panel, Category View, Performance and Maintenance, Administrative Tools, Computer Management.
or click Start...Run...compmgmt.msc
delete the sshd user if it exists in the "System Tools" - "Local Users and Groups" - "Users" section.
EDIT: These steps were originally for XP, and you may need to re-install cygwin afterwards.

干净re-installcygwin

现在它正在工作。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

安装gem时出错:无法为cygwin的堆保留空间,Win32错误487

来自分类Dev

在docker容器中安装cygwin时出错:系统找不到指定的路径。(0x3)错误= hcsshim :: ImportLayer-在Win32中失败失败

来自分类Dev

Visual Studio 2015 中的构建解决方案给出错误“生成 Win32 资源时出错:访问被拒绝”

来自分类Dev

Python Win32:错误

来自分类Dev

C ++,Win32错误

来自分类Dev

System.Printing.PrintServerException:创建PrintServer对象时发生异常。Win32错误:Windows服务拒绝访问

来自分类Dev

Visual Studio:从win32更改为x64时,显示链接错误

来自分类Dev

如何处理Win32错误消息的占位符?

来自分类Dev

win32 GetConsoleMode()错误代码6

来自分类Dev

Unity Android构建错误WIN32异常ZipAlign

来自分类Dev

OPENCV链接错误-Win32和VS2012

来自分类Dev

Win32 :: Job产生错误,使用严格

来自分类Dev

win32 GetConsoleMode()错误代码6

来自分类Dev

py2exe和Win32 OLEObject错误

来自分类Dev

Visual Studio:“不是 Win32 应用程序”错误

来自分类Dev

.Net Framework 4.6安装导致错误“%1不是有效的win32应用程序”

来自分类Dev

将TFS工作空间从“服务器”转换为“本地”失败,并显示错误“无效的Win32 FileTime”

来自分类Dev

VS团队服务中的生成过程错误地将Win32映射到x64

来自分类常见问题

podfile在安装时给出错误

来自分类Dev

使用Eclipse Paho MQTT编译Visual C ++ Win32项目时出现LNK2019错误

来自分类Dev

启动IPython Notebook(Anaconda 3)时出现错误“%1不是有效的Win32应用程序”

来自分类Dev

SSH时访问Digital Ocean服务器会给出错误消息

来自分类Dev

为32位Windows 7安装jdk1.7,但出现错误,表明它不是有效的Win32应用程序

来自分类Dev

Win7 Virtualbox尝试启动vm时出现此错误:加载'crypt32.dll'时出错:1790

来自分类Dev

无法安装Python win32库?

来自分类Dev

在python中加载DLL时出错,不是有效的Win32应用程序

来自分类Dev

在Win32桌面应用程序上创建按钮时出错

来自分类Dev

在Win32桌面应用程序上创建按钮时出错

来自分类Dev

无法在Win32 Open SSH服务器上使用公钥身份验证

Related 相关文章

  1. 1

    安装gem时出错:无法为cygwin的堆保留空间,Win32错误487

  2. 2

    在docker容器中安装cygwin时出错:系统找不到指定的路径。(0x3)错误= hcsshim :: ImportLayer-在Win32中失败失败

  3. 3

    Visual Studio 2015 中的构建解决方案给出错误“生成 Win32 资源时出错:访问被拒绝”

  4. 4

    Python Win32:错误

  5. 5

    C ++,Win32错误

  6. 6

    System.Printing.PrintServerException:创建PrintServer对象时发生异常。Win32错误:Windows服务拒绝访问

  7. 7

    Visual Studio:从win32更改为x64时,显示链接错误

  8. 8

    如何处理Win32错误消息的占位符?

  9. 9

    win32 GetConsoleMode()错误代码6

  10. 10

    Unity Android构建错误WIN32异常ZipAlign

  11. 11

    OPENCV链接错误-Win32和VS2012

  12. 12

    Win32 :: Job产生错误,使用严格

  13. 13

    win32 GetConsoleMode()错误代码6

  14. 14

    py2exe和Win32 OLEObject错误

  15. 15

    Visual Studio:“不是 Win32 应用程序”错误

  16. 16

    .Net Framework 4.6安装导致错误“%1不是有效的win32应用程序”

  17. 17

    将TFS工作空间从“服务器”转换为“本地”失败,并显示错误“无效的Win32 FileTime”

  18. 18

    VS团队服务中的生成过程错误地将Win32映射到x64

  19. 19

    podfile在安装时给出错误

  20. 20

    使用Eclipse Paho MQTT编译Visual C ++ Win32项目时出现LNK2019错误

  21. 21

    启动IPython Notebook(Anaconda 3)时出现错误“%1不是有效的Win32应用程序”

  22. 22

    SSH时访问Digital Ocean服务器会给出错误消息

  23. 23

    为32位Windows 7安装jdk1.7,但出现错误,表明它不是有效的Win32应用程序

  24. 24

    Win7 Virtualbox尝试启动vm时出现此错误:加载'crypt32.dll'时出错:1790

  25. 25

    无法安装Python win32库?

  26. 26

    在python中加载DLL时出错,不是有效的Win32应用程序

  27. 27

    在Win32桌面应用程序上创建按钮时出错

  28. 28

    在Win32桌面应用程序上创建按钮时出错

  29. 29

    无法在Win32 Open SSH服务器上使用公钥身份验证

热门标签

归档