免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 34431 | 回复: 6
打印 上一主题 下一主题

[系统安装] openSUSE-Leap-42.1 连接不上SSH 大侠们帮我看看 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2016-10-31 11:12 |只看该作者 |倒序浏览
我下载的openSUSE-Leap-42.1-DVD-x86_64 安装在虚拟机上!物理机,虚拟机都能相互ping通,ssh服务也开启了,防火墙也设置了,就是不能连接ssh用crt.其它虚拟机都能连上

   

  1. linux-xlsr:~ # cat /etc/ssh/sshd_config
  2. #       $OpenBSD: sshd_config,v 1.93 2014/01/10 05:59:19 djm Exp $

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

  5. # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

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

  10. #Port 22
  11. #AddressFamily any
  12. #ListenAddress 0.0.0.0
  13. #ListenAddress ::

  14. # The default requires explicit activation of protocol 1
  15. #Protocol 2

  16. # HostKey for protocol version 1
  17. #HostKey /etc/ssh/ssh_host_key
  18. # HostKeys for protocol version 2
  19. #HostKey /etc/ssh/ssh_host_rsa_key
  20. #HostKey /etc/ssh/ssh_host_dsa_key
  21. #HostKey /etc/ssh/ssh_host_ecdsa_key
  22. #HostKey /etc/ssh/ssh_host_ed25519_key

  23. # Minimum accepted size of the DH parameter p. By default this is set to 1024
  24. # to maintain compatibility with RFC4419, but should be set higher.
  25. # Upstream default is identical to setting this to 2048.
  26. #KexDHMin 1024

  27. # Lifetime and size of ephemeral version 1 server key
  28. #KeyRegenerationInterval 1h
  29. #ServerKeyBits 1024

  30. # Ciphers and keying
  31. #RekeyLimit default none

  32. # Logging
  33. # obsoletes QuietMode and FascistLogging
  34. #SyslogFacility AUTH
  35. #LogLevel INFO

  36. # Authentication:

  37. #LoginGraceTime 2m
  38. PermitRootLogin yes
  39. #StrictModes yes
  40. #MaxAuthTries 6
  41. #MaxSessions 10

  42. #RSAAuthentication yes
  43. #PubkeyAuthentication yes

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

  47. #AuthorizedPrincipalsFile none

  48. #AuthorizedKeysCommand none
  49. #AuthorizedKeysCommandUser nobody

  50. # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
  51. #RhostsRSAAuthentication no
  52. # similar for protocol version 2
  53. #HostbasedAuthentication no
  54. # Change to yes if you don't trust ~/.ssh/known_hosts for
  55. # RhostsRSAAuthentication and HostbasedAuthentication
  56. #IgnoreUserKnownHosts no
  57. # Don't read the user's ~/.rhosts and ~/.shosts files
  58. #IgnoreRhosts yes

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

  62. # Change to no to disable s/key passwords
  63. #ChallengeResponseAuthentication yes

  64. # Kerberos options
  65. #KerberosAuthentication no
  66. #KerberosOrLocalPasswd yes
  67. #KerberosTicketCleanup yes
  68. #KerberosGetAFSToken no

  69. # GSSAPI options
  70. #GSSAPIAuthentication no
  71. #GSSAPICleanupCredentials yes
  72. #GSSAPIStrictAcceptorCheck yes
  73. #GSSAPIKeyExchange no

  74. # Set this to 'yes' to enable support for the deprecated 'gssapi' authentication
  75. # mechanism to OpenSSH 3.8p1. The newer 'gssapi-with-mic' mechanism is included
  76. # in this release. The use of 'gssapi' is deprecated due to the presence of
  77. # potential man-in-the-middle attacks, which 'gssapi-with-mic' is not susceptible to.
  78. #GSSAPIEnableMITMAttack no


  79. # Set this to 'yes' to enable PAM authentication, account processing,
  80. # and session processing. If this is enabled, PAM authentication will
  81. # be allowed through the ChallengeResponseAuthentication and
  82. # PasswordAuthentication.  Depending on your PAM configuration,
  83. # PAM authentication via ChallengeResponseAuthentication may bypass
  84. # the setting of "PermitRootLogin without-password".
  85. # If you just want the PAM account and session checks to run without
  86. # PAM authentication, then enable this but set PasswordAuthentication
  87. # and ChallengeResponseAuthentication to 'no'.
  88. UsePAM yes

  89. #AllowAgentForwarding yes
  90. #AllowTcpForwarding yes
  91. #GatewayPorts no
  92. X11Forwarding yes
  93. #X11DisplayOffset 10
  94. #X11UseLocalhost yes
  95. #PermitTTY yes
  96. #PrintMotd yes
  97. #PrintLastLog yes
  98. #TCPKeepAlive yes
  99. #UseLogin no
  100. UsePrivilegeSeparation sandbox          # Default for new installations.
  101. #PermitUserEnvironment no
  102. #Compression delayed
  103. #ClientAliveInterval 0
  104. #ClientAliveCountMax 3
  105. #UseDNS yes
  106. #PidFile /run/sshd.pid
  107. #MaxStartups 10:30:100
  108. #PermitTunnel no
  109. #ChrootDirectory none
  110. #VersionAddendum none

  111. # no default banner path
  112. #Banner none

  113. # override default of no subsystems
  114. Subsystem       sftp    /usr/lib/ssh/sftp-server

  115. # This enables accepting locale enviroment variables LC_* LANG, see sshd_config(5).
  116. AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
  117. AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
  118. AcceptEnv LC_IDENTIFICATION LC_ALL

  119. # Example of overriding settings on a per-user basis
  120. #Match User anoncvs
  121. #       X11Forwarding no
  122. #       AllowTcpForwarding no
  123. #       PermitTTY no
  124. #       ForceCommand cvs server
  125. linux-xlsr:~ #
复制代码





论坛徽章:
0
2 [报告]
发表于 2016-10-31 11:37 |只看该作者
回复 1# hrg_hg

已经解决,就是还是得在防火墙上设置  允许的服务里 多加一个 serurt shell 服务 就好 了

论坛徽章:
154
2022北京冬奥会纪念版徽章
日期:2015-08-07 17:10:5720周年集字徽章-年
日期:2022-10-26 16:44:2015-16赛季CBA联赛之深圳
日期:2022-11-02 14:02:4515-16赛季CBA联赛之八一
日期:2022-11-28 12:07:4820周年集字徽章-20	
日期:2023-07-19 08:49:4515-16赛季CBA联赛之八一
日期:2023-11-04 19:23:5115-16赛季CBA联赛之广夏
日期:2023-12-13 18:09:34
3 [报告]
发表于 2016-10-31 16:11 来自手机 |只看该作者
一般从两个角度出发,是否能ping,是否能访问端口服务

论坛徽章:
0
4 [报告]
发表于 2016-11-01 17:27 |只看该作者
回复 3# shang2010

能ping通,不能访问端口服务,但是端口服务是开启的,就是因为opensuse有个防火墙栏了ssh

论坛徽章:
223
2022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:32操作系统版块每日发帖之星
日期:2016-05-10 19:22:58操作系统版块每日发帖之星
日期:2016-02-18 06:20:00操作系统版块每日发帖之星
日期:2016-03-01 06:20:00操作系统版块每日发帖之星
日期:2016-03-02 06:20:0015-16赛季CBA联赛之上海
日期:2019-09-20 12:29:3219周年集字徽章-周
日期:2019-10-01 20:47:4815-16赛季CBA联赛之八一
日期:2020-10-23 18:30:5320周年集字徽章-20	
日期:2020-10-28 14:14:2615-16赛季CBA联赛之广夏
日期:2023-02-25 16:26:26CU十四周年纪念徽章
日期:2023-04-13 12:23:10操作系统版块每日发帖之星
日期:2016-05-10 19:22:58
5 [报告]
发表于 2016-11-01 23:28 |只看该作者
opensuse用的什么安装方式哦??
我大debian系统安装好了默认啥都没有

论坛徽章:
223
2022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:32操作系统版块每日发帖之星
日期:2016-05-10 19:22:58操作系统版块每日发帖之星
日期:2016-02-18 06:20:00操作系统版块每日发帖之星
日期:2016-03-01 06:20:00操作系统版块每日发帖之星
日期:2016-03-02 06:20:0015-16赛季CBA联赛之上海
日期:2019-09-20 12:29:3219周年集字徽章-周
日期:2019-10-01 20:47:4815-16赛季CBA联赛之八一
日期:2020-10-23 18:30:5320周年集字徽章-20	
日期:2020-10-28 14:14:2615-16赛季CBA联赛之广夏
日期:2023-02-25 16:26:26CU十四周年纪念徽章
日期:2023-04-13 12:23:10操作系统版块每日发帖之星
日期:2016-05-10 19:22:58
6 [报告]
发表于 2016-11-01 23:28 |只看该作者
shell@debian:~$ nmap localhost

Starting Nmap 6.47 ( http://nmap.org ) at 2016-11-01 23:28 HKT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00085s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 999 closed ports
PORT    STATE SERVICE
111/tcp open  rpcbind

Nmap done: 1 IP address (1 host up) scanned in 0.23 seconds
shell@debian:~$
shell@debian:~$
shell@debian:~$

论坛徽章:
0
7 [报告]
发表于 2016-11-15 11:29 |只看该作者
iptables -F
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP