Ubuntu基础设定:openssh-server安装和使用
记录一下Ubuntu17.10的openssh-server的安装和使用。安装之后就可以使用ssh登陆Ubuntu了,所以是Ubuntu的基础设定之一。
事前准备
Ubuntu版本:17.10
devops@ubuntu:~$ cat /etc/issue
Ubuntu 17.10 \n \l
devops@ubuntu:~$
devops@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
devops@ubuntu:~$
1
2
3
4
5
6
7
8
9
10
11
17.10的Ubuntu代号Artful Aardvark,于2017年10月19日正式发布,是更换GNOME的首个版本,但是这不是一个LTS版本,会支持到2018年8月,是2018年Ubuntu的LTS的版本之前的过渡版本。openssh-server的安装基本上对于Ubuntu的版本影响非常低,基本操作步骤大体一致。
安装步骤
按照如下安装步骤进行安装
步骤 命令 说明
步骤1 sudo su 切换至root用户,ubuntu缺省下root用户有所限制,使用sudo su可以使用当前管理用户的密码切换至root用户,也可以在需要安装权限的命令前加sudo
步骤2 apt install openssh-server 安装openssh-server
步骤3 ssh -V 确认openssh-server版本
步骤4 /etc/init.d/ssh status 确认openssh-server状态
步骤5 /etc/init.d/ssh restart 重新启动 openssh-server
步骤6 从终端使用ssh命令连接确认
操作日志
此处再以安装的状态下抓取的日志,apt install显示会有所不同
devops@ubuntu:~$ sudo su
[sudo] password for devops:
root@ubuntu:/home/devops#
root@ubuntu:/home/devops# apt install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssh-server is already the newest version (1:7.5p1-10ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 55 not upgraded.
root@ubuntu:/home/devops#
root@ubuntu:/home/devops# ssh -V
OpenSSH_7.5p1 Ubuntu-10ubuntu0.1, OpenSSL 1.0.2g 1 Mar 2016
root@ubuntu:/home/devops#
root@ubuntu:/home/devops# /etc/init.d/ssh status
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-03-03 07:58:44 CST; 51min ago
Process: 3072 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 3071 ExecReload=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Process: 3167 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 3179 (sshd)
Tasks: 1 (limit: 4915)
Memory: 1.0M
CPU: 7ms
CGroup: /system.slice/ssh.service
└─3179 /usr/sbin/sshd -D
Mar 03 07:58:44 ubuntu systemd[1]: Starting OpenBSD Secure Shell server...
Mar 03 07:58:44 ubuntu systemd[1]: Started OpenBSD Secure Shell server.
Mar 03 07:58:44 ubuntu sshd[3179]: Server listening on 0.0.0.0 port 22.
Mar 03 07:58:44 ubuntu sshd[3179]: Server listening on :: port 22.
root@ubuntu:/home/devops#
root@ubuntu:/home/devops# /etc/init.d/ssh restart
[ ok ] Restarting ssh (via systemctl): ssh.service.
root@ubuntu:/home/devops#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
从终端进行ssh连接
liumiaocn:~ liumiao$ ssh devops@192.168.31.19
devops@192.168.31.19's password:
Welcome to Ubuntu 17.10 (GNU/Linux 4.13.0-21-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
58 packages can be updated.
32 updates are security updates.
Last login: Sat Mar 3 07:43:23 2018 from 192.168.31.242
devops@ubuntu:~$
Ubuntu基础设定:openssh-server安装和使用的更多相关文章
- linux应用之openssh server安装及配置(centos)
安装OpenSSH Server 首先,我们搜索一下CentOS的软件库里面有没有已经定义好的SSH服务器包: $ yum search ssh ... ... openssh.x86_64 : An ...
- windows openssh server 安装试用
使用Windows的可能会知道win10 的已经包好了openssh 服务,但是对于其他机器win 7 windows 2008 ,就需要其他的方法了 还好powershell 团队开发了支持wind ...
- Ubuntu 下安装 OpenSSH Server
Ubuntu 下安装 OpenSSH Server 是无比轻松的一件事情,需要的命令只有一条: sudo apt-get install openssh-server (查看返回的结果,如果没有出错, ...
- Ubuntu Server安装图形界面全过程
转载自:http://blog.csdn.net/sunbaigui/article/details/6624110, http://mikewolfli.blog.163.com/blog/stat ...
- Ubuntu服务器上SSH Server 的安装和设置
网上有很多介绍在Ubuntu下开启SSH服务的文章,但大多数介绍的方法测试后都不太理想,均不能实现远程登录到Ubuntu上,最后分析原因是都没有真正开启ssh-server服务.最终成功的方法如下: ...
- Ubuntu 16.04.3 Server 版安装过程图文详解
Ubuntu 16.04.3 Server 版安装过程图文详解 首先,我们会进入系统安装的第一个界面,开始系统的安装操作.每一步的操作,左下角都会提示操作方式! 1.选择系统语言-English2.选 ...
- Ubuntu Server安装R和Rstudio(zz)
Ubuntu Server安装R和Rstudio 发表于 技术天堂 2014-03-15 21:03 字数: 534 阅读量: 205 R是一个在科研领域很常用的工具,经常用R的年轻人或者经常上统计之 ...
- Ubuntu Server 安装部署 Cacti 服务器监控
本文的英文版本链接是 http://xuri.me/2013/10/20/install-the-cacti-server-monitor-on-ubuntu-server.html Cacti是一套 ...
- ubuntu server 安装 mantis bug tracker 中文配置
ubuntu server 安装 mantis bug tracker 中文配置 官网:http://www.mantisbt.org/ 一:安装: 1:进入到 apache2的网站目录: cd /v ...
随机推荐
- R 语言中的多元线性回归
示例 sessionInfo() # 查询版本及系统和库等信息 # 工作目录设置 getwd() path <- "E:/RSpace" setwd(path) rm(lis ...
- iview 在Table组件中使用switch组件并自定义内容和增加自定义事件
注意: 使用render函数. 效果: 添加自定义文字: 1. 2. 上面的两种方法效果都是一样的: 增加自定义事件: 结果: 自信是进步的源泉. 继续加油. ^_^
- python使用配置文件
通过配置文件将变量暴露给用户修改 标准库模块configparser,从而可在配置文件中使用标准格式. 必须使用[files].[colors]等标题将配置文件分成几部分(section).标题的名称 ...
- mysql 报错从 新安装
卸载从新安装,综合运用 https://www.jb51.net/article/146050.htm https://www.jb51.net/article/90275.htm https://w ...
- SpringBoot项目中,异常拦截
SpringBoot自带异常拦截@ControllerAdvice 1.创建一个SellerExceptionHandler类打上@ControllerAdvice标签 @ControllerAdvi ...
- android 支持发送空短信
method:A) AP端修改:1.将ComposeMessageActivity.java 中的 isPreparedForSending() 作如下修改(删掉的code也可以注释掉)private ...
- ZooKeeper 简介说明
1.什么是Zookeeper? Zookeeper是一个高效的分布式协调服务,它暴露了一些公用服务,比如命名/配置管理/同步控制/群组服务等.我们可以使用Zookeeper来实现比如达成共识/集群管理 ...
- You Are Given a WASD-string...
C. You Are Given a WASD-string... 主要看的还是思维,分别求出在上下左右四个方向移动的最大幅度( mov_up, mov_down, mov_right, mov_le ...
- C#程序模拟登录批量获取各种邮件内容信息
一般来说,如果现实中你有这样一种需求“假如你是褥羊毛的羊毛党,你某日发现了一个app有一个活动,通过邮箱注册账号激活可以领5元红包,而恰恰你手上又有一批邮箱可用,那么批量获取邮箱中的激活链接去激活则是 ...
- pygame基本框架
代码: import sys #导入sys模块import pygame #导入pygame模块 pygame.init() #pygame初始化size = width,height = 800,8 ...