赞
踩
首先在Ubuntu系统上安装并启用ssh
打开终端输入
- sudo apt update
- sudo apt install openssh-server
安装完成后可以测试一下ssh是否被启用(一般安装完成自动启用 )
sudo systemctl status ssh
输出表示服务正在运行
- ● ssh.service - OpenBSD Secure Shell server
- Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
- Active: active (running) since Mon 2020-06-01 12:34:00 CEST; 9h ago
上面完成后就可以在局域网通过ssh远程连接Ubuntu了
首先需要知道你的IP地址,在终端输入
ip a
找到 IP 地址后,运行下面的ssh 命令登录远程机器
ssh username@ip_address
- 'username'修改成自己的用户名
- 'ip_address'修改成上一步的IP 地址。
第一次连接时,会看到下面的信息:
- The authenticity of host '192.168.1.104 (192.168.231.129)' can't be established.
- ECDSA key fingerprint is SHA256:AqAuoVjwoRuoiFCZ6tdDmIZBvixrHZn4ykzHkB+wVb8.
- Are you sure you want to continue connecting (yes/no/[fingerprint])?
输入yes,然后ENTER
- Warning: Permanently added '192.168..231.129' (ECDSA) to the list of known hosts.
- linuxize@192.168..231.129's password:
这里输入登录密码,成功后,你将看到Ubuntu默认欢迎信息
- Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-26-generic x86_64)
-
- * Documentation: https://help.ubuntu.com
- * Management: https://landscape.canonical.com
- * Support: https://ubuntu.com/advantage
- ...
好了,现在已成功 ssh 登录到了Ubuntu系统上
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。