码迷,mamicode.com
首页 > Windows程序 > 详细

winsap 连接 Ubuntu linux 19

时间:2020-04-03 13:56:12      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:程序   overwrite   key pair   set   empty   package   java   too   wxs   

电脑 装 18的 Ubuntu 虚拟机没装成功,试了几次, 下载了19的一次就好了,初衷也只是想编译个程序,先这样吧

下面这些常用的先安装上  

1、sudo apt install net-tools

jason@ubuntu:~/Desktop$ sudo apt install net-tools
[sudo] password for jason: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  net-tools
0 upgraded, 1 newly installed, 0 to remove and 209 not upgraded.
Need to get 196 kB of archives.
After this operation, 864 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 net-tools amd64 1.60+git20180626.aebd88e-1ubuntu1 [196 kB]
Fetched 196 kB in 2s (83.7 kB/s)    
Selecting previously unselected package net-tools.
(Reading database ... 181002 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20180626.aebd88e-1ubuntu1_amd64.deb ..
.
Unpacking net-tools (1.60+git20180626.aebd88e-1ubuntu1) ...
Setting up net-tools (1.60+git20180626.aebd88e-1ubuntu1) ...
Processing triggers for man-db (2.8.7-3) ...
jason@ubuntu:~/Desktop$ ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 130.31.88.222  netmask 255.255.252.0  broadcast 130.31.91.255
        inet6 fe80::8a6f:51df:21ca:4c75  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:2b:1e:66  txqueuelen 1000  (Ethernet)
        RX packets 13820  bytes 7419647 (7.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2103  bytes 240318 (240.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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 449  bytes 101118 (101.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 449  bytes 101118 (101.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

  

 

2、ssh  需要输入 Y

 

jason@ubuntu:~/Desktop$ ssh localhost ssh
ssh: connect to host localhost port 22: Connection refused
jason@ubuntu:~/Desktop$ sudo apt-get 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 209 not upgraded.
Need to get 670 kB of archives.
After this operation, 6,001 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

  启动

jason@ubuntu:~/Desktop$ sudo /etc/init
init/            init.d/          initramfs-tools/ 
jason@ubuntu:~/Desktop$ sudo /etc/init.d/ssh start
[ ok ] Starting ssh (via systemctl): ssh.service.
jason@ubuntu:~/Desktop$ 

  

 

jason@ubuntu:~/Desktop$ sudo ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key
Generating public/private rsa key pair.
/etc/ssh/ssh_host_rsa_key already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
The key fingerprint is:
SHA256:o30O6hFWxsqvquAA+7JEVUoyfJMzbLhMWXduA2twITk root@ubuntu
The key‘s randomart image is:
+---[RSA 2048]----+
|.o==o*..         |
| =+EB =.         |
|o +o=o ++        |
| o. ...+.        |
|..    = S        |
|o.   . = .       |
|+.    o + .      |
|=o     + +       |
|.+o..o+   .      |
+----[SHA256]-----+
jason@ubuntu:~/Desktop$ 

  

 

 

jason@ubuntu:~/Desktop$ ps -e|grep ssh
1541 ? 00:00:00 ssh-agent
4731 ? 00:00:00 sshd
jason@ubuntu:~/Desktop$

 

 

技术图片

 

winsap 连接 Ubuntu linux 19

标签:程序   overwrite   key pair   set   empty   package   java   too   wxs   

原文地址:https://www.cnblogs.com/2eggs/p/12625954.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!