我是靠谱客的博主 体贴柠檬,最近开发中收集的这篇文章主要介绍ssh/sftp connect reset by port issue [WSASend() ERROR:10054],觉得挺不错的,现在分享给大家,希望可以做个参考。

概述


**"OpenSSH for Windows" version**
 `((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)`
 7.7.2.0

**Server OperatingSystem**
 `((Get-ItemProperty "HKLM:SOFTWAREMicrosoftWindows ntCurrentVersion" -Name ProductName).ProductName)`
Windows Server 2012 R2 Standard

**Others checking**

PS C:toolsopenssh64> .ssh.exe -vvv myfolder@192.168.0.198

OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.4
debug3: Failed to open file:C:\Users\myfolder/.ssh/config error:2
debug3: Failed to open file:__PROGRAMDATA__\ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.0.198 is address
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.0.198 [192.168.0.198] port 22.
debug1: Connection established.
debug1: identity file C:\Users\myfolder/.ssh/id_rsa type 0
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_rsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\myfolder/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_dsa error:2
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_dsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\myfolder/.ssh/id_dsa type -1
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_dsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\myfolder/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_ecdsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\myfolder/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_ecdsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\myfolder/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_ed25519.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\myfolder/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_ed25519-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\myfolder/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_xmss error:2
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_xmss.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\myfolder/.ssh/id_xmss type -1
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:\Users\myfolder/.ssh/id_xmss-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\myfolder/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_for_Windows_7.7
debug1: match: OpenSSH_for_Windows_7.7 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.0.198:22 as 'myfolder'
debug3: hostkeys_foreach: reading file "C:\Users\myfolder/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\Users\myfolder/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from 192.168.0.198
debug3: Failed to open file:C:\Users\myfolder/.ssh/known_hosts2 error:2
debug3: Failed to open file:__PROGRAMDATA__\ssh/ssh_known_hosts error:2
debug3: Failed to open file:__PROGRAMDATA__\ssh/ssh_known_hosts2 error:2
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@ope
nssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: send - WSASend() ERROR:10054, io:000000C2B5385D40
Connection reset by 192.168.0.198 port 22
PS C:toolsopenssh64> .ssh.exe  myfolder@192.168.0.198
Connection reset by 192.168.0.198 port 22


PS C:toolsopenssh64> (Get-Acl C:Usersmyfolder.sshauthorized_keys).Access

FileSystemRights  : FullControl
AccessControlType : Allow
IdentityReference : NT AUTHORITYSYSTEM
IsInherited       : True
InheritanceFlags  : None
PropagationFlags  : None

FileSystemRights  : FullControl
AccessControlType : Allow
IdentityReference : BUILTINAdministrators
IsInherited       : True
InheritanceFlags  : None
PropagationFlags  : None

FileSystemRights  : FullControl
AccessControlType : Allow
IdentityReference : myfolder
IsInherited       : True
InheritanceFlags  : None
PropagationFlags  : None

PS C:toolsopenssh64> FixHostFilePermissions.ps1
  [*] C:ProgramDatasshsshd_config
      looks good

  [*] C:ProgramDatasshssh_host_dsa_key
      looks good

  [*] C:ProgramDatasshssh_host_dsa_key.pub
      looks good

  [*] C:ProgramDatasshssh_host_ecdsa_key
      looks good

  [*] C:ProgramDatasshssh_host_ecdsa_key.pub
      looks good

  [*] C:ProgramDatasshssh_host_ed25519_key
      looks good

  [*] C:ProgramDatasshssh_host_ed25519_key.pub
      looks good

  [*] C:ProgramDatasshssh_host_rsa_key
      looks good

  [*] C:ProgramDatasshssh_host_rsa_key.pub
      looks good

  [*] C:Usersmyfolder.sshauthorized_keys
      looks good

**sshd_config**

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey __PROGRAMDATA__/ssh/ssh_host_rsa_key
#HostKey __PROGRAMDATA__/ssh/ssh_host_dsa_key
#HostKey __PROGRAMDATA__/ssh/ssh_host_ecdsa_key
#HostKey __PROGRAMDATA__/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile    .ssh/authorized_keys

#AuthorizedPrincipalsFile none

# For this to work you will also need host keys in %programData%/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# override default of no subsystems
Subsystem    sftp    sftp-server.exe

# Example of overriding settings on a per-user basis
#Match User anoncvs
#    AllowTcpForwarding no
#    PermitTTY no
#    ForceCommand cvs server
 

最后

以上就是体贴柠檬为你收集整理的ssh/sftp connect reset by port issue [WSASend() ERROR:10054]的全部内容,希望文章能够帮你解决ssh/sftp connect reset by port issue [WSASend() ERROR:10054]所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(56)

评论列表共有 0 条评论

立即
投稿
返回
顶部