当前位置:首页 > 未分类 > 正文内容

vyos 配置ssh登录

jxcq1年前 (2025-03-03)未分类130


configure


单网卡:dhcp

set interfaces eth eth0 address  dhcp

commit

save

使用密码ssh登录

set service ssh

compare

commit

save


双网卡:静态

# WAN

set interfaces ethernet eth0 address "${_IF_WAN_IPv4}"

set interfaces ethernet eth0 description 'WAN'

set interfaces ethernet eth0 mtu '1500'


# LAN

set interfaces ethernet eth1 address "${_IF_MGMT_IPv4}"

set interfaces ethernet eth1 description 'MGMT'

set interfaces ethernet eth1 mtu '1450'


# VIP

set interfaces dummy dum1 address "${_EIP_VIP_IPv4}"

set interfaces dummy dum1 description 'VIP 1'


set interfaces dummy dum2 address "${_ANYCAST_IPv4}"

set interfaces dummy dum2 address "${_ANYCAST_IPv6}"

set interfaces dummy dum2 description 'IP anycast for service'


不使用密码ssh登录


configure


set system login user vyos authentication public-keys naa0yama key 'AAAAB3Nz'

set system login user vyos authentication public-keys naa0yama type 'ssh-rsa'

compare

commit


关闭密码登录

configure

set service ssh

set service ssh disable-password-authentication


compare

commit

https://blog.naa0yama.com/p/45w08-4z8f0rhu/


密钥登录方法

https://www.cnblogs.com/xsummerx/articles/17707994.html

扫描二维码推送至手机访问。

版权声明:本文由小强的小站发布,如需转载请注明出处。

本文链接:https://zblog.dragon2024.cloudns.ch/?id=62

分享给朋友:

“vyos 配置ssh登录” 的相关文章

FRP内网穿透+openwrt-FRP客户端设置

1、一台vps主机2、ssh连接主机下载最新frp软件https://github.com/MvsCode/frps-onekeyhttps://github.com/fatedier/frpwget https://github.com/fatedier/frp/releases/dow...

ESXI挂载移动硬盘

ESXI挂载移动硬盘

开启ESXI的ssh服务不要接移动硬盘从终端ssh进ESXIssh root@192.168.50.5停止usbarbitrator服务/etc/init.d/usbarbitrator stop chkconfig usbarbitrator off插入移...

debian-网卡名称的变迁(ethX -> enpXsY)

早几年前,Linux 系统的网卡名称都是 eth0、wlan0,后来都变了个风格,就拿我的电脑举例:enp7s0, wlp6s0。这到底是是什么原因呢?最近突然好奇,去查了资料才知道为什么。在 Fedora 的技术资料中找到,这个和 Systemd 有关,然后又在 freedesktop 官网 Sy...

debian12下解决EXT4-fs error (/dev/nvme0n1p1):comm ext4lazyinit:bg 16:bad block bitmap checksum

安装smartctl软件sudo apt-get install smartmontools    # Debian/Ubuntusudo yum install smartmontools        # RedHat/CentOSsu...

debian12查看硬盘分区UUID

df  -lfdisk -lls -l /dev/disk/by-uuid开机挂载硬盘:nano /etc/fstabUUID=xxxxxxxx-b23a-974c-96b5-da80140d5d38      /root/docker/hdd/wxy&nbs...

rotueos 基本命令

查看ip:       ip add print增加ip地址:ip address add address=x.x.x.x/24 interface=ether1(第一块网卡)删除ip:       ip address...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。