SecureCRT连接Ubuntu报The remote system refused the connection.解决方案

偏执的太偏执、 2022-08-14 04:57 101阅读 0赞

使用SecureCRT连接到远程Ubuntu,连接失败报The remote system refused the connection.

进入Ubuntu系统,终端中敲入以下命令:

  1. ps -ef|grep ssh

20151122203949483
发现只有ssh-agent进程,而没有sshd进程,缺省情况下没有安装ssh-server

在终端中敲入以下命名安装openssh-server即可

  1. sudo apt-get install openssh-server

安装过程如下,网络快的话两分钟左右,安装完毕后再次使用ps -ef|grep ssh命令查看sshd进程是否运行,如果正常运行使用SecureCRT重新尝试连接即可。

  1. Reading package lists... Done
  2. Building dependency tree
  3. Reading state information... Done
  4. The following extra packages will be installed:
  5. libck-connector0 ncurses-term openssh-client openssh-sftp-server
  6. python-requests python-urllib3 ssh-import-id
  7. Suggested packages:
  8. libpam-ssh keychain monkeysphere rssh molly-guard
  9. The following NEW packages will be installed:
  10. libck-connector0 ncurses-term openssh-server openssh-sftp-server
  11. python-requests python-urllib3 ssh-import-id
  12. The following packages will be upgraded:
  13. openssh-client
  14. 1 upgraded, 7 newly installed, 0 to remove and 264 not upgraded.
  15. Need to get 1,279 kB of archives.
  16. After this operation, 3,896 kB of additional disk space will be used.
  17. Do you want to continue? [Y/n] Y
  18. Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main libck-connector0 i386 0.4.5-3.1ubuntu2 [10.1 kB]
  19. Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/main ncurses-term all 5.9+20140118-1ubuntu1 [243 kB]
  20. Get:3 http://security.ubuntu.com/ubuntu/ trusty-security/main openssh-client i386 1:6.6p1-2ubuntu2.3 [576 kB]
  21. Get:4 http://security.ubuntu.com/ubuntu/ trusty-security/main openssh-sftp-server i386 1:6.6p1-2ubuntu2.3 [35.6 kB]
  22. Get:5 http://security.ubuntu.com/ubuntu/ trusty-security/main openssh-server i386 1:6.6p1-2ubuntu2.3 [324 kB]
  23. Get:6 http://security.ubuntu.com/ubuntu/ trusty-security/main python-requests all 2.2.1-1ubuntu0.2 [43.0 kB]
  24. Get:7 http://us.archive.ubuntu.com/ubuntu/ trusty/main python-urllib3 all 1.7.1-1build1 [38.9 kB]
  25. Get:8 http://us.archive.ubuntu.com/ubuntu/ trusty/main ssh-import-id all 3.21-0ubuntu1 [9,624 B]
  26. Fetched 1,279 kB in 1min 37s (13.2 kB/s)
  27. Preconfiguring packages ...
  28. Selecting previously unselected package libck-connector0:i386.
  29. (Reading database ... 169027 files and directories currently installed.)
  30. Preparing to unpack .../libck-connector0_0.4.5-3.1ubuntu2_i386.deb ...
  31. Unpacking libck-connector0:i386 (0.4.5-3.1ubuntu2) ...
  32. Preparing to unpack .../openssh-client_1%3a6.6p1-2ubuntu2.3_i386.deb ...
  33. Unpacking openssh-client (1:6.6p1-2ubuntu2.3) over (1:6.6p1-2ubuntu2) ...
  34. Selecting previously unselected package ncurses-term.
  35. Preparing to unpack .../ncurses-term_5.9+20140118-1ubuntu1_all.deb ...
  36. Unpacking ncurses-term (5.9+20140118-1ubuntu1) ...
  37. Selecting previously unselected package openssh-sftp-server.
  38. Preparing to unpack .../openssh-sftp-server_1%3a6.6p1-2ubuntu2.3_i386.deb ...
  39. Unpacking openssh-sftp-server (1:6.6p1-2ubuntu2.3) ...
  40. Selecting previously unselected package openssh-server.
  41. Preparing to unpack .../openssh-server_1%3a6.6p1-2ubuntu2.3_i386.deb ...
  42. Unpacking openssh-server (1:6.6p1-2ubuntu2.3) ...
  43. Selecting previously unselected package python-urllib3.
  44. Preparing to unpack .../python-urllib3_1.7.1-1build1_all.deb ...
  45. Unpacking python-urllib3 (1.7.1-1build1) ...
  46. Selecting previously unselected package python-requests.
  47. Preparing to unpack .../python-requests_2.2.1-1ubuntu0.2_all.deb ...
  48. Unpacking python-requests (2.2.1-1ubuntu0.2) ...
  49. Selecting previously unselected package ssh-import-id.
  50. Preparing to unpack .../ssh-import-id_3.21-0ubuntu1_all.deb ...
  51. Unpacking ssh-import-id (3.21-0ubuntu1) ...
  52. Processing triggers for man-db (2.6.7.1-1) ...
  53. Processing triggers for ureadahead (0.100.0-16) ...
  54. ureadahead will be reprofiled on next reboot
  55. Processing triggers for ufw (0.34~rc-0ubuntu2) ...
  56. Setting up libck-connector0:i386 (0.4.5-3.1ubuntu2) ...
  57. Setting up openssh-client (1:6.6p1-2ubuntu2.3) ...
  58. Setting up ncurses-term (5.9+20140118-1ubuntu1) ...
  59. Setting up openssh-sftp-server (1:6.6p1-2ubuntu2.3) ...
  60. Setting up openssh-server (1:6.6p1-2ubuntu2.3) ...
  61. Creating SSH2 RSA key; this may take some time ...
  62. Creating SSH2 DSA key; this may take some time ...
  63. Creating SSH2 ECDSA key; this may take some time ...
  64. Creating SSH2 ED25519 key; this may take some time ...
  65. ssh start/running, process 5002
  66. Setting up python-urllib3 (1.7.1-1build1) ...
  67. Setting up python-requests (2.2.1-1ubuntu0.2) ...
  68. Setting up ssh-import-id (3.21-0ubuntu1) ...
  69. Processing triggers for libc-bin (2.19-0ubuntu6) ...
  70. Processing triggers for ureadahead (0.100.0-16) ...
  71. Processing triggers for ufw (0.34~rc-0ubuntu2) ...

发表评论

表情:
评论列表 (有 0 条评论,101人围观)

还没有评论,来说两句吧...

相关阅读