ubuntu20离线安装ssh
时间: 2023-05-04 09:06:54 浏览: 906
在Ubuntu20离线环境下安装SSH,需要以下步骤:
1. 下载所需的ssh包及其依赖库,并拷贝到离线环境中。
2. 安装依赖库。在离线环境中使用以下命令进行安装:
sudo dpkg -i xxxxx.deb(其中,xxxxx.deb为所需的依赖库包名)
3. 安装ssh包。在离线环境中使用以下命令进行安装:
sudo dpkg -i xxxxx.deb(其中,xxxxx.deb为所需的ssh包名)
4. 配置ssh服务。在离线环境中使用以下命令进行配置:
sudo vim /etc/ssh/sshd_config
在文件中进行相关的配置,如修改端口号、禁用密码登陆等参数。
5. 启动ssh服务。在离线环境中使用以下命令进行启动:
sudo service ssh start
或者
sudo /etc/init.d/ssh start
启动成功后,可以在远程终端通过ssh client进行ssh登陆。
以上就是在Ubuntu20离线环境下安装SSH的步骤,需要特别注意的是,离线环境下需要提前准备好所有的依赖库及其包,以及ssh包,否则无法完成安装和启动服务。
相关问题
ubuntu20.04离线安装ssh
安装SSH在Ubuntu 20.04上可以通过以下步骤完成:
1. 打开终端并运行以下命令以更新软件包列表:
sudo apt update
2. 运行以下命令以安装SSH:
sudo apt install openssh-server
3. SSH将被安装并自动启动。你可以通过以下命令检查它是否正在运行:
systemctl status ssh
如果输出显示“ active (running)”则说明SSH正在运行。
现在您已经成功在Ubuntu 20.04上安装了SSH。
ubuntu18.04离线安装ssh
### 回答1:
要在Ubuntu 18.04上离线安装SSH,您可以按照以下步骤操作:
1. 在另一台联网的计算机上下载SSH软件包及其所有依赖项。您可以使用以下命令将它们打包成一个tar文件:
```
sudo apt-get install openssh-server
sudo apt-get install openssh-client
sudo apt-get install ssh
sudo apt-get install sshpass
sudo apt-get install libssh2-1
sudo apt-get install libssh2-1-dev
sudo apt-get install libssh2-1-dbg
sudo apt-get install libssh2-1-doc
sudo apt-get install libssh2-1-test
sudo apt-get install libssh2-ocaml
sudo apt-get install libssh2-ocaml-dev
sudo apt-get install libssh-4
sudo apt-get install libssh-dev
sudo apt-get install libssh-doc
sudo apt-get install libssh-gcrypt-4
sudo apt-get install libssh-gcrypt-dev
sudo apt-get install libssh-gcrypt-doc
sudo apt-get install libssh-krb5-27
sudo apt-get install libssh-krb5-dev
sudo apt-get install libssh-krb5-doc
sudo apt-get install libssh-4-dbg
sudo apt-get install libssh-4-doc
sudo apt-get install libssh-4-dev
sudo apt-get install libssh-4-test
sudo apt-get install libssh-4-ocaml
sudo apt-get install libssh-4-ocaml-dev
sudo apt-get install libssh-4-ocaml-doc
sudo apt-get install libssh-4-ocaml-dbg
sudo apt-get install libssh-4-ocaml-test
sudo apt-get install libssh-4-ocaml-dev-doc
sudo apt-get install libssh-4-ocaml-dev-dbg
sudo apt-get install libssh-4-ocaml-dev-test
sudo apt-get install libssh-4-ocaml-dev-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-doc
sudo apt-get install libssh-4-ocaml-dev-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test
sudo apt-get install libssh-4-ocaml-dev-dbg-doc
sudo apt-get install libssh-4-ocaml-dev-test-dbg
sudo apt-get install libssh-4-ocaml-dev-dbg-doc
sudo apt-get install libssh-4-ocaml-dev-test-doc
sudo apt-get install libssh-4-ocaml-dev-test-dbg-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install libssh-4-ocaml-dev-dbg-test-doc
sudo apt-get install lib
### 回答2:
要在Ubuntu 18.04上进行离线安装SSH,您需要以下步骤:
1. 下载必要软件包:您需要下载OpenSSH Server软件包以及其所有依赖项(包括libcrypt1和libc6)。您可以在其他电脑上下载这些软件包,并将它们复制到目标Ubuntu机器上。
2. 安装必要软件包:请使用dpkg命令(例如“ sudo dpkg -i openssh-server_7.6p1-4ubuntu0.3_amd64.deb”)来将软件包安装到Ubuntu系统中。如果出现错误,请使用apt-get命令来解决依赖问题。
3. 配置SSH:打开/etc/ssh/sshd_config文件并进行所需的更改。您可以更改端口,禁用root登陆,启用公钥验证等等。更改完成后,请使用命令“ sudo systemctl restart ssh”重启SSH服务。
4. 测试SSH:通过使用另一台电脑或工具(例如Putty)连接到Ubuntu机器来测试SSH连接。如果连接成功,则您现在可以通过SSH实现Ubuntu 18.04的远程访问和管理。
总之,在Ubuntu 18.04上离线安装SSH并不特别困难,只需遵循上述步骤即可实现成功安装。由于安全问题,请确保安装并配置SSH时使用安全的密码策略和基本安全知识,以最大限度地保护您的系统。
### 回答3:
要在Ubuntu 18.04上离线安装SSH,您需要遵循以下步骤:
1.获取OpenSSH软件包:
您可以从官方Ubuntu软件包网站(https://packages.ubuntu.com/)或从其他Ubuntu软件包存储库下载OpenSSH软件包。最好选择与您的Ubuntu版本相匹配的OpenSSH软件包。您可以将软件包下载到本地系统或移动设备中。
2.在Ubuntu安装OpenSSH:
一旦您获得了OpenSSH软件包,您需要将其转移到Ubuntu系统中进行安装。如果您已经将软件包下载到本地系统中,在Ubuntu中打开终端并导航到软件包的目录。在那里,运行以下命令以安装OpenSSH:
sudo dpkg -i <openssh-package-name.deb>
这将安装OpenSSH并处理任何依赖项。请注意,如果OpenSSH需要其他软件包才能正常工作,则可能需要手动从其他Ubuntu存储库中获取这些软件包。
3.配置OpenSSH:
一旦OpenSSH安装完成,您需要在Ubuntu中配置它。打开终端并输入以下命令以在Ubuntu上配置OpenSSH:
sudo systemctl enable ssh
sudo systemctl start ssh
这将启用和启动SSH服务,并在Ubuntu开机时自动启动SSH服务。然后,您可以使用SSH客户端连接到Ubuntu系统。
总结:
通过遵循上述步骤,您可以在Ubuntu 18.04上离线安装和配置OpenSSH。这将允许您使用SSH客户端连接到Ubuntu系统并进行远程管理和文件传输。请注意,为了保持系统安全,您应该尽可能使用SSH密钥而不是密码进行身份验证。
阅读全文
相关推荐














