首页 > 系统相关 >ubuntu:安装/启动ssh(23.10)

ubuntu:安装/启动ssh(23.10)

时间:2023-11-14 09:04:18浏览次数:33  
标签:10 sshd 23.10 service systemd ssh lhdpc ubuntu

一,ubuntu23.10默认未安装ssh

如下:

liuhongdi@lhdpc:~$ service ssh status
Unit ssh.service could not be found.

二,安装ssh

1,从命令行安装

root@lhdpc:~# apt-get install ssh

2,安装完成后查看效果:

root@lhdpc:~# service ssh status 
○ ssh.service - OpenBSD Secure Shell server 
     Loaded: loaded (/lib/systemd/system/ssh.service; disabled; preset: enabled) 
    Drop-In: /etc/systemd/system/ssh.service.d 
             └─00-socket.conf 
     Active: inactive (dead) 
TriggeredBy: ● ssh.socket 
       Docs: man:sshd(8) 
             man:sshd_config(5)

3,启动服务:

root@lhdpc:~# service ssh start

服务启动后查看效果,可见已启动

root@lhdpc:~# service ssh status
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; disabled; preset: enabled)
    Drop-In: /etc/systemd/system/ssh.service.d
             └─00-socket.conf
     Active: active (running) since Fri 2023-11-10 19:00:14 CST; 3s ago
TriggeredBy: ● ssh.socket
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 7904 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
   Main PID: 7905 (sshd)
      Tasks: 1 (limit: 4519)
     Memory: 1.3M
        CPU: 31ms
     CGroup: /system.slice/ssh.service
             └─7905 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
11月 10 19:00:14 lhdpc systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
11月 10 19:00:14 lhdpc sshd[7905]: Server listening on :: port 22.
11月 10 19:00:14 lhdpc systemd[1]: Started ssh.service - OpenBSD Secure Shell server.

如图:

说明:刘宏缔的架构森林—专注it技术的博客,
网站:https://blog.imgtouch.com
原文: https://blog.imgtouch.com/index.php/2023/11/10/ubuntu-an-zhuang-qi-dong-ssh-23-10/
代码: https://github.com/liuhongdi/ 或 https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: [email protected]

三,查看ubuntu的版本:

root@lhdpc:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 23.10
Release:        23.10
Codename:       mantic

标签:10,sshd,23.10,service,systemd,ssh,lhdpc,ubuntu
From: https://www.cnblogs.com/architectforest/p/17830793.html

相关文章

  • ubuntu:dpkg操作deb包(23.10)
    一,查看某个文件所属的deb包:root@lhdpc:/usr/local/source/Python-3.12.0#dpkg-S/usr/bin/python3python3-minimal:/usr/bin/python3二,查看dpkg的版本号root@lhdpc:/usr/local/source/Python-3.12.0#dpkg--versionDebiandpkg软件包管理程序1.22.0(amd64)版。......
  • ubuntu:python:编译安装过程中的报错(python 3.12/ubuntu 23.10)
    一,参考文档:https://devguide.python.org/getting-started/setup-building/#install-dependencies主要是补充python所需依赖的开发库,如果这些库未安装,则在安装python的过程中就会报出下面所列的错误,安装依赖库的命令:ubuntu如下:sudoapt-getinstallbuild-essentialgdbl......
  • windows 10 安装ubuntu+docker(不安装desktop docker)步骤
    windows10安装ubuntu+docker(不安装desktopdocker)步骤1.安装wsl2,ubuntu22.04参考网络文档2.powershell里运行wsl3.sudo-i4.curl-fsSLhttps://get.docker.com-oget-docker.sh5.shget-docker.sh6.servicedockerstart7.在2.1通过脚本安装docker时,会出现下面这个问......
  • Linux Ubuntu部署C++环境与VS Code编辑器
      本文介绍在LinuxUbuntu操作系统下,配置VisualStudioCode软件与C++代码开发环境的方法。  在文章VMware虚拟机中安装LinuxUbuntu操作系统中,我们介绍了LinuxUbuntu操作系统的下载、安装方法;本文则基于前述基础,继续介绍在LinuxUbuntu操作系统中配置VisualStudioCode软......
  • ubuntu克隆系统
    环境ubuntu22.04需求最近有业务,需要烧卡到cf卡上,由于系统盘只有2.0的接口,烧一个30g带软件的ubuntu系统通常需要3,4个小时,而且不能并发,并发会引起莫名其妙的错误,导致需要重新烧卡方法1使用Systemback工具,这个工具可以实现ubuntu系统的镜像归档、复制和克隆安装。在你的原始Ubu......
  • SSH高级应用之远程端口转发并实现网关功能
    端口转发实现逻辑我们直接来看这图好,那么现在呢?你假设你是出差在外的用户,比方说有一个笔记本用户出差了。明白了好。现在是这样的,这个服务器呢?是在你企业内部的。那么,企业内部要想。让互联网的用户想访问,通常来讲是访问不了的,因为什么有防火墙?他会阻止你访问企业内部的服务器,所以......
  • DevOps系列---【jenkinsfile使用sshpass发送到另一台服务器】
    1.首先在宿主机安装sshpass2.把物理机的sshpass复制到容器中whichsshpasscp$(whichsshpass)/usr/local/app/dockercpsshpass容器id:/usr/local/bin/sshpass3.在jenkinsfile中添加#在stages中添加stagestage('部署TEST服务'){steps{sh"sshpass-proot......
  • 2023.10.21 CSP-S 复赛游记
    2023.10.21CSP-S复赛游记咕了一段时间。Day-2上午下午正常打模拟赛、改题,晚上开始复习板子。主要是确实忘了很多东西。Day-1上午的模拟赛没参加,打了一天板子。图论还是我的一大弱点。被Tarjan薄纱下午写了个计划,把已经复习的和没有复习的都写出来了,发现要复习的板子......
  • ubuntu arm64 配置静态IP 并实现VNC远程树梅派
    1.设置静态IP完成后ifconfig查看IPpingIP地址测试 ping192.168.10.1592.VNC远程树梅派树梅派VNC是server端,VNC版本是:RealVNC客户端:archubuntu18 一开始用gvncviewer连接,出现秒断开的问题,如下:$gvncviewer192.168.149.1ConnectedtoserverDisconnectedfromser......
  • ubuntu开发之安装QT creater出现文本文件忙解决办法
    问题:问题解析:其实就跟windows下面,该文件已被打开,无法删除是一样的道理。解决办法:①找到该文件被那个进程所进行着指令如下:【可知被2537进程使用】sudofuser文件名②杀死该进程sudokill-9进程号现象:......