Page MenuHomeVyOS Platform

Add ssh-client source-interface CLI option
Closed, ResolvedPublicFEATURE REQUEST

Description

Extend SSH client CLI options to not only support source-address but also support source-interface, thus the client can use IPv4 and IPv6 to connect to clients.

BindInterface
Use the address of the specified interface on the local machine as the source address of the connection.

Details

Version
-
Is it a breaking change?
Perfectly compatible

Event Timeline

c-po changed the task status from Open to In progress.Jan 8 2023, 8:11 AM
c-po claimed this task.
c-po moved this task from Open to Finished on the VyOS 1.4 Sagitta board.
c-po moved this task from Need Triage to In Progress on the VyOS 1.3 Equuleus (1.3.3) board.
c-po moved this task from In Progress to Finished on the VyOS 1.3 Equuleus (1.3.3) board.

The issue is not found in 1.3.8 version but found in 1.4.0 and latest 1.5 rolling release.

vyos@testing#  set system option ssh-client source-interface dum0
[edit]
vyos@testing# commit
[ system option ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us on Slack where our users exchange help and advice:
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
  business policy requires it)
- and include all the information presented below

Report time:      2024-08-21 09:18:08
Image version:    VyOS 1.4.0
Release train:    sagitta

Built by:         Sentrium S.L.
Built on:         Tue 04 Jun 2024 09:23 UTC
Build UUID:       5e6ae0c4-4d17-4b69-9247-b4ba44a3e3c2
Build commit ID:  35dd8ae6522c78-dirty

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    9f8e0364-e51d-4642-ae07-2dcf81c3c2b6

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/system_option.py", line 161, in <module>
    verify(c)
  File "/usr/libexec/vyos/conf_mode/system_option.py", line 76, in verify
    verify_source_interface(config)
  File "/usr/lib/python3/dist-packages/vyos/configverify.py", line 277, in verify_source_interface
    ifname = config['ifname']
             ~~~~~~^^^^^^^^^^
KeyError: 'ifname'

possible fix

if 'source_interface' in config:
    # my code here
    config['ifname'] = config['source_interface']