[GH-ISSUE #155] Is it possible to remove a particular host key? #35

Closed
opened 2026-05-07 00:17:55 +02:00 by BreizhHardware · 3 comments

Originally created by @dwydler on GitHub (Mar 8, 2021).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/155

Hi Guys,
on the weeekend had to generate a new ssh key pair on Switch. By that all users get on connection attempt an error, that the fingerprint not anymore correct. Also in the output the exact command ssh-keygen is displayed for the user.

But the user can not execute the command on this shell (osh.pl). Is there a option in the configuration file of the bastion to allow this?

Regards,
Daniel

Originally created by @dwydler on GitHub (Mar 8, 2021). Original GitHub issue: https://github.com/ovh/the-bastion/issues/155 Hi Guys, on the weeekend had to generate a new ssh key pair on Switch. By that all users get on connection attempt an error, that the fingerprint not anymore correct. Also in the output the exact command _ssh-keygen_ is displayed for the user. But the user can not execute the command on this shell (osh.pl). Is there a option in the configuration file of the bastion to allow this? Regards, Daniel
BreizhHardware 2026-05-07 00:17:55 +02:00
Author
Owner

@speed47 commented on GitHub (Mar 16, 2021):

Yes, there is an osh command to do that: --osh selfForgetHostKey --host ip.or.example.org.
The documentation is over here.

For completeness sake, if remote hostkeys change often or for some reason on specific accounts you want to relax this security, you can use --osh accountModify --account ACCOUNT --egress-strict-host-key-checking yes|no|ask|default|bypass, more info here

<!-- gh-comment-id:800166906 --> @speed47 commented on GitHub (Mar 16, 2021): Yes, there is an osh command to do that: `--osh selfForgetHostKey --host ip.or.example.org`. The documentation is [over here](https://ovh.github.io/the-bastion/plugins/open/selfForgetHostKey.html). For completeness sake, if remote hostkeys change often or for some reason on specific accounts you want to relax this security, you can use `--osh accountModify --account ACCOUNT --egress-strict-host-key-checking yes|no|ask|default|bypass`, more info [here](https://ovh.github.io/the-bastion/plugins/restricted/accountModify.html)
Author
Owner

@dwydler commented on GitHub (Mar 16, 2021):

It's technical possible to replace the the command ssh-keygen with the `osh.pl``?
So all users have distinct and clear instructions what is to do. I am a lazy it admin.. ;-)

<!-- gh-comment-id:800490379 --> @dwydler commented on GitHub (Mar 16, 2021): It's technical possible to replace the the command `ssh-keygen` with the `osh.pl``? So all users have distinct and clear instructions what is to do. I am a lazy it admin.. ;-)
Author
Owner

@speed47 commented on GitHub (Mar 17, 2021):

Actually, this is already the case, but after looking into it, I see that the output message of SSH changed a bit in the latest versions, so this is no longer correctly detected to print our own help message instead.

<!-- gh-comment-id:800927686 --> @speed47 commented on GitHub (Mar 17, 2021): Actually, this is already the case, but after looking into it, I see that the output message of SSH changed a bit in the latest versions, so this is no longer correctly detected to print our own help message instead.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#35
No description provided.