首页 > 系统相关 >ubuntu 防火墙开放端口(开启ssh)

ubuntu 防火墙开放端口(开启ssh)

时间:2023-04-12 16:36:11浏览次数:34  
标签:22 sudo 端口 防火墙 开启 ssh ubuntu

ubuntu开放端口:
sudo ufw status(查看防火墙是否开启)
sudo ufw enable(开启防火墙)
sudo ufw allow 22(开启22号端口)

验证端口ss -tnl | grep 22(对应端口号) 命令监听端口事件。
使用命令ps -e | grep ssh查询是否有sshd这个守护进程。

如果没有 则使用sudo apt install openssh-server安装ssh服务。

标签:22,sudo,端口,防火墙,开启,ssh,ubuntu
From: https://www.cnblogs.com/muzlei/p/17310235.html

相关文章

  • Ubuntu 软件仓库镜像
    Ubuntu软件仓库镜像使用帮助Ubuntu的软件源配置文件是/etc/apt/sources.list。#默认注释了源码镜像以提高aptupdate速度,如有需要可自行取消注释debhttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/jammymainrestricteduniversemultiverse#deb-srchttps://mirrors......
  • 如何查看Linux发行版本是Ubuntu还是CentOS
     https://askubuntu.com/questions/459402/how-to-know-if-the-running-platform-is-ubuntu-or-centos-with-help-of-a-bash-scri HowtoknowiftherunningplatformisUbuntuorCentOSwithhelpofaBashscript? OS_NAME=$(lsb_release-si)case"$OS_N......
  • ubuntu22.04 部署filebeat 8.7
    下载filebeat#curl-L-Ohttps://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.7.0-linux-x86_64.tar.gz创建数据目录#mkdir-pv/data/apps/filbeat/{data,logs}安装filebeat#tarxzvffilebeat-8.7.0-linux-x86_64.tar.gz-C/usr/local/#ln-sv/usr/......
  • python ssh Linux机器 paramiko库的简单使用
    pythonsshLinux机器paramiko库的简单使用以用户名密码方式连接Linux主机defconn_by_password():"""1)如果抛出异常:SSHException:Server'172.17.140.17'notfoundinknown_hosts则需要设置ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy(......
  • ssh-keygen
    主机密钥主机密钥通常在安装SSH服务器时自动生成。它们可以随时再生。$ls-l/etc/ssh/total548-rw-r--r--1rootroot505426Feb262022moduli-rw-r--r--1rootroot1650Feb262022ssh_configdrwxr-xr-x2rootroot4096Feb262022ssh_config.d-r......
  • 在Ubuntu系统上安装windows
    需要的工具:U盘 1.打开ubuntu启动盘制作工具,下载ubuntu镜像,制作启动器2.u盘启动,进入tryubuntu3.终端打开gparted  分割出一块合适大小的nfts区域用来装windows,如果直接用ubuntu的话由于本身的磁盘就在使用所以不能操作,只能在类似pe的系统里面操作4.制作windows启动盘......
  • ubuntu上安装docker-compose遇到Permission denied问题
    根据github.com/docker/compose/releases中安装compose的说明,在ubuntu上执行以下安装命令:curl-L https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname-s)-$(uname-m)"-o/usr/local/bin/docker-compose命令执行返回的结果是:-bash:/usr/......
  • 墨干编辑器 V1.1.2:提供 macOS arm 和 Ubuntu 安装包
    墨干编辑器V1.1.2:提供macOSarm和Ubuntu安装包来源:投稿作者: 沈浪熊猫儿2023-04-1011:22:00 0马上下载 :https://mogan.app/guide/Install.html重要变更社区:官网上线 https://mogan.app ,参加由中科院软件所举办的开源之夏2023界面:图标由GNUTeX......
  • ubuntu 编译出现错误fatal error: bits/libc-header-start.h: No such file or direct
    在ubuntugcc编译程序出现错误fatalerror:bits/libc-header-start.h:Nosuchfileordirectory表明缺少库环境。解决方法aptupdateapt-getinstallgcc-multilib成功编译......
  • 基于Ubuntu Ubuntu Touch OTA-25 于 3 月 24 日发布
    近日消息,UBports基金会宣布将于3月24日推出UbuntuTouchOTA-25,这是基于Ubuntu16.04(XenialXerus)的最后一个版本。Ubuntu是一个以桌面应用为主的Linux操作系统,Ubuntu基于Debian发行版和Gnome桌面环境,Ubuntu也拥有庞大的社区力量,用户可以方便地从社区获得帮助。 ......