【Linux】ubuntu安装ssh服务端openssh-server

【Linux】ubuntu安装ssh服务端openssh-serverLinux ubuntu 安装 ssh 服务端 openssh server1 背景 2 解决办法 3 测试 1 背景 ubuntu 安装后默认只有 ssh 客户端 只能去连其它 ssh 服务器 其它客户端想要连接这个 ubuntu 系统 需要安装部署 ssh 服务端 SecureShell SSH 是一种加密网络协议 用于在不安全的网络上安全地运行网络服务 利用 SSH 可以实现加密并安全地远程登录计算机系统 2 解决办法安装命令如下 sudoaptinsta server 详细安装日志 yus

【Linux】ubuntu安装ssh服务端openssh-server

1、背景

2、解决办法

安装命令如下:

sudo apt install openssh-server 

详细安装日志:

yus@jn:~/Test$ sudo apt install openssh-server Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: ncurses-term openssh-sftp-server ssh-import-id Suggested packages: molly-guard monkeysphere rssh ssh-askpass The following NEW packages will be installed: ncurses-term openssh-server openssh-sftp-server ssh-import-id 0 upgraded, 4 newly installed, 0 to remove and 10 not upgraded. Need to get 637 kB of archives. After this operation, 5,316 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main amd64 ncurses-term all 6.1-1ubuntu1.18.04 [248 kB] Get:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main amd64 openssh-sftp-server amd64 1:7.6p1-4ubuntu0.3 [45.6 kB] Get:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main amd64 openssh-server amd64 1:7.6p1-4ubuntu0.3 [333 kB] Get:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main amd64 ssh-import-id all 5.7-0ubuntu1.1 [10.9 kB] Fetched 637 kB in 1s (458 kB/s) Preconfiguring packages ... Selecting previously unselected package ncurses-term. (Reading database ...  files and directories currently installed.) Preparing to unpack .../ncurses-term_6.1-1ubuntu1.18.04_all.deb ... Unpacking ncurses-term (6.1-1ubuntu1.18.04) ... Selecting previously unselected package openssh-sftp-server. Preparing to unpack .../openssh-sftp-server_1%3a7.6p1-4ubuntu0.3_amd64.deb ... Unpacking openssh-sftp-server (1:7.6p1-4ubuntu0.3) ... Selecting previously unselected package openssh-server. Preparing to unpack .../openssh-server_1%3a7.6p1-4ubuntu0.3_amd64.deb ... Unpacking openssh-server (1:7.6p1-4ubuntu0.3) ... Selecting previously unselected package ssh-import-id. Preparing to unpack .../ssh-import-id_5.7-0ubuntu1.1_all.deb ... Unpacking ssh-import-id (5.7-0ubuntu1.1) ... Setting up ncurses-term (6.1-1ubuntu1.18.04) ... Setting up openssh-sftp-server (1:7.6p1-4ubuntu0.3) ... Setting up ssh-import-id (5.7-0ubuntu1.1) ... Setting up openssh-server (1:7.6p1-4ubuntu0.3) ... Creating config file /etc/ssh/sshd_config with new version Creating SSH2 RSA key; this may take some time ... 2048 SHA256:UVU9dG8lhh4sAvp68p7I/V2I3VEkQcqLJopXcgbqARw root@ts006-MS-7A94 (RSA) Creating SSH2 ECDSA key; this may take some time ... 256 SHA256:Nh0RpvlORi2IRD5r6T/SHEZFfcJRlkKIJxRZ4kgu3pc root@ts006-MS-7A94 (ECDSA) Creating SSH2 ED25519 key; this may take some time ... 256 SHA256:NbjnEQNRR8UHfUyt1Wl+PrfMkHev6y3PxeunU+cQhJQ root@ts006-MS-7A94 (ED25519) Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service. Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service → /lib/systemd/system/ssh.service. Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ... Processing triggers for ureadahead (0.100.0-21) ... ureadahead will be reprofiled on next reboot Processing triggers for systemd (237-3ubuntu10.39) ... yus@jn:~/Test$ sudo ifconfig [sudo] password for yus: eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.104 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::a11d:bb94:cfa3:1f2f prefixlen 64 scopeid 0x20<link> ether 00:d8:61:18:0d:95 txqueuelen 1000 (Ethernet) RX packets  bytes  (4.6 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets  bytes  (23.6 GB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 16 memory 0x92f00000-92f20000 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets  bytes  (23.4 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets  bytes  (23.4 GB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 yus@jn:~/Test$ 

3、测试

如下表示连接成功 !

Administrator@PJ9NM MINGW64 ~ $ ssh yus@192.168.1.104 yus@192.168.1.104's password: Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 5.3.0-51-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage * Canonical Livepatch is available for installation. - Reduce system reboots and improve kernel security. Activate at: https://ubuntu.com/livepatch 11 packages can be updated. 0 updates are security updates. Your Hardware Enablement Stack (HWE) is supported until April 2023. The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. yus@jn:~$ 
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/200440.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月20日 上午10:50
下一篇 2026年3月20日 上午10:50


相关推荐

  • iphone一键转移_苹果手机如何一键转移数据 转移教程介绍

    iphone一键转移_苹果手机如何一键转移数据 转移教程介绍众所周知,要更换手机的话,旧手机上的数据怎么办还真的是一个难题啊,毕竟手机用久了,上面的有各种重要的数据不是。那苹果手机换机的话,将数据进行转移,可以分成两种情况,一种吧,就是苹果转苹果,一种就是苹果转安卓了。苹果手机数据转移到新iPhone1、借助iCloud云备份手机自带的云备份功能,肯定是可以用上的。①手机连接上WiFi,然后在手机“设置”中,依次点击“AppleID——iCloud——i…

    2022年5月25日
    59
  • kworkers_work为什么名词

    kworkers_work为什么名词1.简介:    在spi驱动中用到了内核的线程,用的函数就是跟kthread_worker和kthread_work相关的函数,对于这两个名词的翻译,在网上暂时没有找到合适的,先翻译成线程内核线程相关的:工人和工作,这么直白的翻译是根据其工作原理相关的,本来想翻译成别的,一想到他的实现方式,直白的翻译,更能让人理解。    此部分介绍的函数主要在inc

    2026年3月9日
    7
  • 数组 函数_从零开始的基础篇

    数组 函数_从零开始的基础篇一、数组操作的基本函数数组的键名和值array_values($arr);获得数组的值array_keys($arr);获得数组的键名array_flip($arr);数组中的值与键名互换(如

    2022年8月5日
    11
  • Ps怎么替换物品颜色?3种方法,Nano Banana精准修改指定区域

    Ps怎么替换物品颜色?3种方法,Nano Banana精准修改指定区域

    2026年3月15日
    3
  • out of memory解决方法(python慢的原因)

    折腾了一整天又换电脑又重装系统重装各种软件插件 最后发现outofmemory只是因为少写了一行代码 内心的崩溃无法用语言形容 虽然本来是乌龙一场但是这个过程中解决问题get一些新技能 也不能说完全没有收获【一个大写的心理安慰】开始我的4G小笔记本outofmemory之后,我换了一个32G内存的电脑 各种重装系统折腾半天好不容易都装好了程序可

    2022年4月15日
    175
  • Symantec 卸载密码方法

    Symantec 卸载密码方法Symantec卸载密码方法最的有很多朋友问…方法一:当时就是输入在服务器端设置的密码(诺顿的默认密码是symantec)方法二:修改注册表HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6CurrentVersion\AdministratorOnly\Security修改UseV…

    2022年6月3日
    210

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号