ubuntu 安装ssh-server时出现错误

骑猪看日落 2022-09-24 05:20 279阅读 0赞

sources.list文件内容如下:

  1. ## Major bug fix updates produced after the final release of the
  2. ## distribution.
  3. deb http://old-releases.ubuntu.com/ubuntu/ maverick main restricted
  4. deb-src http://old-releases.ubuntu.com/ubuntu/ maverick main restricted
  5. deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted
  6. deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted
  7. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  8. ## team. Also, please note that software in universe WILL NOT receive any
  9. ## review or updates from the Ubuntu security team.
  10. deb http://old-releases.ubuntu.com/ubuntu/ maverick universe
  11. deb-src http://old-releases.ubuntu.com/ubuntu/ maverick universe
  12. deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates universe
  13. deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-updates universe
  14. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  15. ## team, and may not be under a free licence. Please satisfy yourself as to
  16. ## your rights to use the software. Also, please note that software in
  17. ## multiverse WILL NOT receive any review or updates from the Ubuntu
  18. ## security team.
  19. deb http://old-releases.ubuntu.com/ubuntu/ maverick multiverse
  20. deb-src http://old-releases.ubuntu.com/ubuntu/ maverick multiverse
  21. deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates multiverse
  22. deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-updates multiverse
  23. ## Uncomment the following two lines to add software from the 'backports'
  24. ## repository.
  25. ## N.B. software from this repository may not have been tested as
  26. ## extensively as that contained in the main release, although it includes
  27. ## newer versions of some applications which may provide useful features.
  28. ## Also, please note that software in backports WILL NOT receive any review
  29. ## or updates from the Ubuntu security team.
  30. # deb http://us.old-releases.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
  31. # deb-src http://us.old-releases.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
  32. #remastersys for backup installed system
  33. deb http://www.remastersys.com/ubuntu maverick main
  34. # deb cdrom:[Ubuntu 13.04 _Raring Ringtail_ - Release i386 (20130424)]/ raring main restricted
  35. # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
  36. # newer versions of the distribution.
  37. deb http://us.archive.ubuntu.com/ubuntu/ raring main restricted
  38. deb-src http://us.archive.ubuntu.com/ubuntu/ raring main restricted
  39. ## Major bug fix updates produced after the final release of the
  40. ## distribution.
  41. deb http://us.archive.ubuntu.com/ubuntu/ raring-updates main restricted
  42. deb-src http://us.archive.ubuntu.com/ubuntu/ raring-updates main restricted
  43. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  44. ## team. Also, please note that software in universe WILL NOT receive any
  45. ## review or updates from the Ubuntu security team.
  46. deb http://us.archive.ubuntu.com/ubuntu/ raring universe
  47. deb-src http://us.archive.ubuntu.com/ubuntu/ raring universe
  48. deb http://us.archive.ubuntu.com/ubuntu/ raring-updates universe
  49. deb-src http://us.archive.ubuntu.com/ubuntu/ raring-updates universe
  50. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  51. ## team, and may not be under a free licence. Please satisfy yourself as to
  52. ## your rights to use the software. Also, please note that software in
  53. ## multiverse WILL NOT receive any review or updates from the Ubuntu
  54. ## security team.
  55. deb http://us.archive.ubuntu.com/ubuntu/ raring multiverse
  56. deb-src http://us.archive.ubuntu.com/ubuntu/ raring multiverse
  57. deb http://us.archive.ubuntu.com/ubuntu/ raring-updates multiverse
  58. deb-src http://us.archive.ubuntu.com/ubuntu/ raring-updates multiverse
  59. ## N.B. software from this repository may not have been tested as
  60. ## extensively as that contained in the main release, although it includes
  61. ## newer versions of some applications which may provide useful features.
  62. ## Also, please note that software in backports WILL NOT receive any review
  63. ## or updates from the Ubuntu security team.
  64. deb http://us.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
  65. deb-src http://us.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
  66. deb http://security.ubuntu.com/ubuntu raring-security main restricted
  67. deb-src http://security.ubuntu.com/ubuntu raring-security main restricted
  68. deb http://security.ubuntu.com/ubuntu raring-security universe
  69. deb-src http://security.ubuntu.com/ubuntu raring-security universe
  70. deb http://security.ubuntu.com/ubuntu raring-security multiverse
  71. deb-src http://security.ubuntu.com/ubuntu raring-security multiverse
  72. ## Uncomment the following two lines to add software from Canonical's
  73. ## 'partner' repository.
  74. ## This software is not part of Ubuntu, but is offered by Canonical and the
  75. ## respective vendors as a service to Ubuntu users.
  76. # deb http://archive.canonical.com/ubuntu raring partner
  77. # deb-src http://archive.canonical.com/ubuntu raring partner
  78. ## This software is not part of Ubuntu, but is offered by third-party
  79. ## developers who want to ship their latest software.
  80. deb http://extras.ubuntu.com/ubuntu raring main
  81. deb-src http://extras.ubuntu.com/ubuntu raring main
  82. deb http://mirrors.ustc.edu.cn/ubuntu/ saucy main restricted universe multiverse
  83. deb http://mirrors.ustc.edu.cn/ubuntu/ saucy-security main restricted universe multiverse
  84. deb http://mirrors.ustc.edu.cn/ubuntu/ saucy-updates main restricted universe multiverse
  85. deb http://mirrors.ustc.edu.cn/ubuntu/ saucy-proposed main restricted universe multiverse
  86. deb http://mirrors.ustc.edu.cn/ubuntu/ saucy-backports main restricted universe multiverse

备份原来的sources.list

  1. cp /etc/apt/sources.list /etc/apt/sources.list.banckup

替换sources.list

  1. cp /home/hui/Download/sources.list /etc/apt/sources.list

重点内容更新包

  1. sudo apt-get update

报错,版本不一致

  1. Reading package lists... Done
  2. Building dependency tree
  3. Reading state information... Done
  4. Some packages could not be installed. This may mean that you have
  5. requested an impossible situation or if you are using the unstable
  6. distribution that some required packages have not yet been created
  7. or been moved out of Incoming.
  8. The following information may help to resolve the situation:
  9. The following packages have unmet dependencies:
  10. openssh-server: Depends: openssh-client (= 1:5.3p1-3ubuntu3) but 1:5.3p1-3ubuntu4 is to be installed
  11. E: Broken packages

重点内容输入如下命令即可:

  1. sudo apt-get install openssh-client=1:5.3p1-3ubuntu3

然后出现下面的执行过程:

  1. Reading package lists... Done
  2. Building dependency tree
  3. Reading state information... Done
  4. Suggested packages:
  5. libpam-ssh keychain openssh-blacklist openssh-blacklist-extra
  6. The following packages will be DOWNGRADED:
  7. openssh-client
  8. 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 299 not upgraded.
  9. Need to get 761kB of archives.
  10. After this operation, 0B of additional disk space will be used.
  11. Do you want to continue [Y/n]? y
  12. Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/main openssh-client 1:5.3p1-3ubuntu3 [761kB]
  13. Fetched 761kB in 1min 48s (7,003B/s)
  14. dpkg: warning: downgrading openssh-client from 1:5.3p1-3ubuntu4 to 1:5.3p1-3ubuntu3.
  15. (Reading database ... 124425 files and directories currently installed.)
  16. Preparing to replace openssh-client 1:5.3p1-3ubuntu4 (using .../openssh-client_1%3a5.3p1-3ubuntu3_i386.deb) ...
  17. Unpacking replacement openssh-client ...
  18. Processing triggers for man-db ...
  19. Setting up openssh-client (1:5.3p1-3ubuntu3) ...

安装 openssh-server

  1. sudo apt-get install openssh-server

提示,标示安装成功

  1. Reading package lists... Done
  2. Building dependency tree
  3. Reading state information... Done
  4. Suggested packages:
  5. rssh molly-guard openssh-blacklist openssh-blacklist-extra
  6. The following NEW packages will be installed:
  7. openssh-server
  8. 0 upgraded, 1 newly installed, 0 to remove and 299 not upgraded.
  9. Need to get 285kB of archives.
  10. After this operation, 778kB of additional disk space will be used.
  11. Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/main openssh-server 1:5.3p1-3ubuntu3 [285kB]
  12. Fetched 285kB in 1min 13s (3,866B/s)
  13. Preconfiguring packages ...
  14. Selecting previously deselected package openssh-server.
  15. (Reading database ... 124425 files and directories currently installed.)
  16. Unpacking openssh-server (from .../openssh-server_1%3a5.3p1-3ubuntu3_i386.deb) ...
  17. Processing triggers for ureadahead ...
  18. ureadahead will be reprofiled on next reboot
  19. Processing triggers for ufw ...
  20. Processing triggers for man-db ...
  21. Setting up openssh-server (1:5.3p1-3ubuntu3) ...
  22. Creating SSH2 RSA key; this may take some time ...
  23. Creating SSH2 DSA key; this may take some time ...
  24. * Stopping OpenBSD Secure Shell server sshd [ OK ]
  25. ssh start/running, process 10119

查看启动

  1. ps -e |grep ssh

如下:表示启动成功

  1. root@ubuntu:/etc/apt# ps -e|grep ssh
  2. 8396 ? 00:00:00 ssh-agent
  3. 11177 ? 00:00:00 sshd

发表评论

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

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

相关阅读