How to enable SSH access on Vyatta router

Last updated on October 4, 2012 by Dan Nanni

A fresh installation of Vyatta (now renamed to VyOS) does not have SSH access enabled by default. Thus, if you would like to SSH to a Vyatta router, you first need to enable SSH service.

In order to enable SSH access on Vyatta router, first enter the Vyatta's CLI with:

$ configure

Next, enable SSH service SSH service with default port 22 as follows.

$ set service ssh

If you would like to change SSH port number to something else (e.g., 666) as a security precaution, you can use the following command instead.

$ set service ssh port 666

Now the following command allows the root user to log in via SSH. Without this, only non-root users will be able to SSH to the router.

$ set service ssh allow-root

If you want to enable SSH service on an internal interface, so that you can SSH to Vyatta router from within internal networks only, you can use the following command. I assume that 192.168.10.1 is the IP address of Vyatta router's LAN interface.

$ set service ssh listen-address 192.168.10.1 

Go ahead and commit the changes to reload Vyatta configuration.

$ commit

Finally, save the updated configuration permanently and exit.

$ save
$ exit

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean