FileZilla连接ubuntu

我新搭建了一个ubuntu

1.查看ssh的状态:

sudo service sshd status

如果出现:

 ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab
   Active: active (running) since Thu 2021-12-02 19:40:57 PST; 1min 32s ago
 Main PID: 3780 (sshd)
    Tasks: 1 (limit: 2295)
   CGroup: /system.slice/ssh.service
           └─3780 /usr/sbin/sshd -D

则已经安装了,Active: active (running)说明已经启动

如果出现:

Unit sshd.service could not be found.

则说明还没有安装

2.安装ssh:

首先更新源:(没有这一步会报错)

sudo apt-get update

然后安装ssh:

sudo apt-get install openssh-server

按照提示选择yes就行了

3.打开ssh:

sudo service sshd start

是否开启成功跟第一步一样

4.FileZilla连接虚拟机:

查看虚拟机的ip地址:

ifconfig

输出的:

ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.197.128  netmask 255.255.255.0  broadcast 192.168.197.255
        inet6 fe80::d0f3:e43f:58a2:9f4d  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:45:c3:4f  txqueuelen 1000  (Ethernet)
        RX packets 25032  bytes 33398122 (33.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4328  bytes 446288 (446.2 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 399  bytes 34391 (34.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 399  bytes 34391 (34.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

则我的ip地址为:192.168.197.128

打开FileZilla:
FileZilla连接ubuntu_第1张图片
成功连上之后的状态:
FileZilla连接ubuntu_第2张图片

你可能感兴趣的:(ubuntu,ssh,服务器)