Linux ubuntu 安装ssh服务

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

参考:https://www.cnblogs.com/pluslius/p/9893340.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值