1.安装
sudo apt-get install openssh-server
2.启动与停止
/etc/init.d/ssh start //启动
/etc/init.d/ssh stop //停止
/etc/init.d/ssh restart //重启
3.使用
串口工具xshell(其他也可以),新建ssh连接,第一次会提醒输入账号和密码,打开如下:
Copyright (c) 2002 NetSarang Computer, Inc. All rights reserved.
Type `help' to learn how to use Xshell prompt.
[C:\~]$
Connecting to 192.168.74.128:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 5.3.0-46-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
104 packages can be updated.
63 updates are security updates.
Your Hardware Enablement Stack (HWE) is supported until April 2023.
Last login: Mon Aug 31 16:12:47 2020 from 192.168.74.1
rick@ubuntu:~$
/etc/init.d/ssh restart
4.其他使用举例:
scp -P 4588 remote@xxx.xxx.xxx:/usr/local/sin.sh /home/administrator //xx为IP
本文详细介绍了如何在Ubuntu系统上安装、启动、停止及重启SSH服务,通过串口工具如Xshell进行远程连接,并提供了使用scp命令进行文件传输的示例。适合初学者快速掌握SSH的基本操作。
1851

被折叠的 条评论
为什么被折叠?



