Linux 下安装 openssh server

栏目: 服务器 · 发布时间: 7年前

内容简介:一般服务器中会默认已经安装 SSH server,而个人版本的发行版,比如桌面版的 Ubuntu 或者我用的 Mint 可能默认没有安装,那么就需要自己安装配置。可以通过下面命令查看安装包sudo apt search ssh

一般服务器中会默认已经安装 SSH server,而个人版本的发行版,比如桌面版的 Ubuntu 或者我用的 Mint 可能默认没有安装,那么就需要自己安装配置。

SSH is program and protocol for securely logging into remote machines across a network. It allows you to run programs, and do a variety of tasks as if you were sitting at the machine. SSH is very similar to telnet except for it is with encryption to protect the transferred information and authentication.

安装

可以通过下面命令查看安装包

sudo apt search ssh

或者

sudo apt search openssh

通过下面命令安装

sudo apt install openssh-server

配置

sudo vim /etc/ssh/sshd_config

来修改 ssh 默认的配置,可以通过修改 Port 来指定 ssh 默认监听端口 22

然后使用如下命令重启 ssh 服务

sudo /etc/init.d/ssh restart

在其他电脑上可以使用 ssh name@address -p port 来连接。

openssh 和 ssh 包的区别

使用 apt search 的时候会发现,有 openssh 和 ssh 两个不同的 package

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                      -      

openssh 的包中又分为 server 和 client ,对于只需要安装 server 的机器来说只需要安装 server,客户端也单独安装就可以。而如果直接安装 ssh 的话,client 和 server 都会安装。使用 aptitude show ssh 可以查看 package 的具体信息。

reference


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

构建之法(第二版)

构建之法(第二版)

邹欣 / 人民邮电出版社 / 2015-7 / 59

软件工程牵涉的范围很广, 同时也是一般院校的同学反映比较空洞乏味的课程。 但是软件工程的技术对于投身IT 产业的学生来说是非常重要的。作者邹欣有长达20年的一线软件开发经验,他利用业余时间在数所高校进行了长达6年的软件工程教学实践,总结出了在16周的时间内让同学们通过 “做中学 (Learning By Doing)” 掌握实用的软件工程技术的教学计划,并得到高校师生的积极反馈。在此基础上,作者对......一起来看看 《构建之法(第二版)》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

随机密码生成器
随机密码生成器

多种字符组合密码

MD5 加密
MD5 加密

MD5 加密工具