我正在设置一个LAMP服务器,并想使用SSH。我看到了一个命令
如果我现在运行apt-get install openssh,那么我的机器上会有两个不同版本的ssh吗?
sudo apt-get install ssh
,不知道它是否与openssh是同一件事?如果我现在运行apt-get install openssh,那么我的机器上会有两个不同版本的ssh吗?
sudo apt-get install ssh
,不知道它是否与openssh是同一件事?aptitude search ssh
。你会得到一个相当大的输出,但我会为你挑选一些:i A openssh-client - secure shell (SSH) client, for secure acce
p openssh-server - secure shell (SSH) server, for secure acce
p ssh - secure shell client and server (metapackag
v ssh-client -
v ssh-server -
Package: ssh
State: not installed
Version: 1:6.6p1-2ubuntu2.8
Priority: optional
Section: net
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Uncompressed Size: 29,7 k
Depends: openssh-client (>= 1:6.6p1-2ubuntu2.8), openssh-server (>= 1:6.6p1-2ubuntu2.8)
Description: secure shell client and server (metapackage)
This metapackage is a convenient way to install both the OpenSSH client and the OpenSSH server. It provides nothing in and of itself, so you
may remove it if nothing depends on it.
Homepage: http://www.openssh.org/
Depends
开头的内容。这意味着“为了安装此软件包,还必须安装以下软件包”。现在看看:它同时安装了openssh-client和openssh-server。aptitude install openssh-server
只会安装openssh-server。aptitude install ssh
将同时安装openssh-server和openssh-client,但除非你的配置非常奇怪,否则你几乎肯定已经安装了openssh-client。
apt-get
,这完全没问题。我更喜欢aptitude
,因为它集成了不同的apt-*程序的许多功能。例如,搜索命令需要使用apt-cache
而不是apt-get
。新出现的是apt
,在16.04LTS中默认包含。 - jawthesharkdpkg
,apt-get
(以及许多以apt-
开头的其他工具),aptitude
和现在的apt
。按顺序来说,dpkg
是最早的,而apt
是最新的。 - jawthesharkssh
,然后再卸载ssh
,它是否也会自动删除之前已经安装的openssh-client
? - WinEunuuchs2Unix