#Linux(SSH软件安装及简单使用)

(一)发行版:Ubuntu16.04.7


(二)记录:

(1)终端键入(root权限)安装

apt-get install openssh-server

 安装时遇到报错

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

输入以下命令解决

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*
sudo dpkg --configure -a
sudo apt update

 解决参考:

【已解决】Could not get lock /var/lib/dpkg/lock-frontend_could not get lock /var/lib/dpkg/lock-frontend - o-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/lun55423/article/details/108907779

(2)修改配置文件

a.在终端输入以下命令修改配置文件。

sudo vi /etc/ssh/sshd_config

b.在底部依次输入

Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,
ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org

 c.由于ssh默认不允许root用户登录,所以还需打开配置文件修改

//进入配置文件
sudo vi /etc/ssh/sshd_config

//键入"/+单词"进行查找    
/PermitRootLogin

 

(3)重启ssh

/etc/init.d/ssh restart

 

(4)在windows上安装ssh客户端SSHSecureShellClient-3.2.9.exe

下载地址: (安装一路next)ssh secure shell client下载-ssh secure shell client官方免费下载[网络监测]-华军软件园 (onlinedown.net)icon-default.png?t=N7T8https://www.onlinedown.net/soft/10002183.htm

(5)Ubuntu和Windows互相ping 看是否通

(6)安装之后会出现两个图标

第一个用于连接Ubuntu控制台

第二个用于Windows和Ubuntu互传文件

(7)双击第二个图标

验证root密码成功之后

(8)示例:将Ubuntu的文件传给Windows 

(9)示例:将windows上的文件传入Ubuntu

 

(10)示例:远程控制Ubuntu控制台删除刚才传入的readme.txt

a.打开第一个软件按照上述类似方法连接

b. 键入命令删除文件

c.查看Ubuntu中是否删除该文件


(三)命令:

相关推荐

  1. clickhouse安装简单使用

    2024-03-28 20:16:01       83 阅读
  2. 树莓派 gpio 安装简单使用

    2024-03-28 20:16:01       72 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-28 20:16:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-28 20:16:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-28 20:16:01       82 阅读
  4. Python语言-面向对象

    2024-03-28 20:16:01       91 阅读

热门阅读

  1. Educational Codeforces Round 163 (Rated for Div. 2)

    2024-03-28 20:16:01       46 阅读
  2. C# var

    2024-03-28 20:16:01       46 阅读
  3. 2024年第四届天府杯B题赛题

    2024-03-28 20:16:01       38 阅读
  4. 自定义对外开放接口的加解密和签名、验签

    2024-03-28 20:16:01       43 阅读
  5. docker的dockerfile

    2024-03-28 20:16:01       43 阅读