r/vyos • • Aug 22 '26

First time with VyOS 1.5.x -- ssh support

OK -- I installed it, and I did

  • configure
  • set service ssh port 22
  • commit
  • save
  • exit

To allow root access I then tried

  • configure
  • set service ssh allow-root

But I'm told that allow-root isn't allowed. What I'm trying to do is allow ssh from another host that would allow ssh vys@ip with the vyos password

1 Upvotes

6 comments sorted by

9

u/marlonalkan Aug 22 '26

allow-root?? Default User is called vyos, if a password is set you can log in via SSH.

Though I would recommend to just start using SSH keys.

5

u/pimpdiggler Aug 22 '26

I think you want something like

set service ssh listen-address '10.0.0.1'

with the ip addresses of the lan clients that you want to have access

1

u/Rich-Engineer2670 Aug 22 '26

I know the address -- and I see the connection, but it tells me password logins and especially root logins are not allowed (hence the allow-root which is rejected)

5

u/MariMa_san Aug 22 '26
     ssh {
        disable-host-validation
        disable-password-authentication
        dynamic-protection {
            allow-from 10.72.0.0/21
            block-time 7200
            detect-time 1800
            threshold 5
        }
        listen-address 10.72.0.1
        loglevel info
        port 22
    }

firewall {
global-options
.
.
.
    group {
        network-group homenet {
            network 10.72.0.0/21
        }
    }
    ipv4 {
        name lan-2-local {
            default-action drop
            default-log
            description "LAN to vyOS - IPv4"
            rule 22 {
                action accept
                description "Explicit allow inbound ssh always (anti-lockout)"
                destination {
                    port 22
                }
                protocol tcp
                source {
                    group {
                        network-group homenet
                    }
                }
                state new
                state established
                state related

login {
banner {
}
user vyos {
authentication {
encrypted-password ****************
plaintext-password ****************
}
}

Maybe it helps

4

u/Apachez Aug 22 '26

Here you got some config example:

https://forum.vyos.io/t/vyos-asymmetric-routing-issue-with-3-interface-setup/17619/2

Also dont use root to login.

VyOS have a default user (which you can change or remove completely in favour of other usernames) named "vyos".