News for hackers. Stuff that matters.
Re:We need better support for SSH host certificates by hnlmorg on Monday March 27, 2023 @02:24AM (#35323489)
Not the OP but if anyone doesn’t have access to a browser in my org then I can safely say they’re not accessing from a company laptop and thus should be denied access.
Re:We need better support for SSH host certificates by hamburglar on Monday March 27, 2023 @02:51AM (#35323629)
Not sure why you'd get downvoted for this comment. This is likely very applicable for many orgs that have operator workstation standards -- they're some kind of window/osx/linux box with a defined/enforced endpoint protection measures, and they all have a browser. Any device I can imagine ssh'ing from that doesn't have a browser is definitely out of policy.
Re:We need better support for SSH host certificates by 0xedd on Monday March 27, 2023 @03:44AM (#35323980)
because both of you narrow visioned the scenario to what you do daily. it is a common use case to ssh from a jump server, use ssh based CLI tools and debugging. the issue stems from windows users who are coupled to GUIs. the behavior pattern increases IT and DevOps costs unnecessarily.

an alternative example: our org solves the issue with TOTP, required every 8 hours for any operation; from ssh/git CLI based actions (prompted at the terminal) to SSO integrations. decoupling security from unrelated programs. simple and elegant.

Re:We need better support for SSH host certificates by Macha on Monday March 27, 2023 @07:04AM (#35325149)
The -J parameter to say will transparently use a jump server and doesn't require the ssh key being on the third party server. I can't speak for tooling on step-ca but my employers in house tooling works similarly and loads the short lived signed cert into your ssh-agent so once you do the initial auth you can do whatever SSH things.
Re:We need better support for SSH host certificates by hamburglar on Monday March 27, 2023 @11:44AM (#35328163)
As pointed out, whether or not you go through a jump host isn’t relevant. We all go through jump hosts as well.

Besides, neither me nor GP is saying this needs to be a universal pattern. We are saying that it’s a viable pattern for a lot of orgs.

Re:We need better support for SSH host certificates by hnlmorg on Tuesday March 28, 2023 @03:38AM (#35337142)
There are better ways to access remote servers than using a jump box. If you’ve gone to the lengths to tie SSH auth into a web based SSO then you should have at least set up you’re other infra to manage network access already (since that’s a far bigger security concern).

Plus, as others have said, you can jump through SSH sessions with on the client ssh command (ie without having to manually invoke ssh on the jump box).

Re:We need better support for SSH host certificates by moondev on Monday March 27, 2023 @05:53AM (#35324723)
Re:We need better support for SSH host certificates by gpderetta on Monday March 27, 2023 @03:38AM (#35323939)
You really never ssh from one remote server to another?
Re:We need better support for SSH host certificates by rfoo on Monday March 27, 2023 @03:43AM (#35323971)
Not GP, but:

I do, however when I do this I make sure the certificate is signed with permit-agent-forwarding and demand people just forward their ssh agent on their laptops.

This also discourages people from leaving their SSH private key on a server just for ssh-ing into other servers in CRON instead of using a proper machine-key.

Re:We need better support for SSH host certificates by the8472 on Monday March 27, 2023 @09:06AM (#35326193)
Agent forwarding has its own security issues, you're exposing all your credentials to the remote.

It's better to configure jump hosts in your local ssh config.

Re:We need better support for SSH host certificates by rfoo on Tuesday March 28, 2023 @05:42AM (#35338033)
There's SSH agent restriction now.

[1] https://www.openssh.com/agent-restrict.html

Re:We need better support for SSH host certificates by rhco on Monday March 27, 2023 @04:36AM (#35324299)
The CA CLI tool we use supports a few auth methods, including a passphrase-like one. It likely could be set up with TOTP or a hardware token also. We only use OAuth because it's convenient and secure-enough for our use case.
Re:We need better support for SSH host certificates by michaelt on Monday March 27, 2023 @04:47AM (#35324361)
In general for systems like this, you can open the browser link from a different host.

For example, if I've SSHed from my laptop to Host A to Host B to Host C then need to authenticate a CLI program I'm running on Host C, the program can show a link in the terminal which I can open on my laptop.

Re:We need better support for SSH host certificates by gpderetta on Monday March 27, 2023 @07:59AM (#35325530)
Having to interact with the browser every time I need to ssh to a machine would be extremely painful.

If key forwarding works, that might be workable.

I'm extremely wary of non-standard ssh login processes as they tend to break basic scripting and tooling.

Re:We need better support for SSH host certificates by michaelt on Monday March 27, 2023 @12:11PM (#35328476)
These tools usually cache your identity, so you might only need to go through a browser once a day.
Re:We need better support for SSH host certificates by fellerts on Monday March 27, 2023 @07:15AM (#35325218)
I suppose this could be solved by using the first server as an SSH jump host -- see SSH(1) for the -J flag. Useful e.g. when the target server requires public key authentication and you don't want to copy the key to the jump host. Not sure it would work in this scenario though.
Re:We need better support for SSH host certificates by zomgwat on Monday March 27, 2023 @08:53AM (#35326038)
SSHing from one remote server to another won’t be possible in a lot of environments due to network segmentation. For example, it shouldn’t be possible to hop from one host to another via SSH in a prod network supporting a SaaS service. Network access controls in that type of environment should limit network access to only what’s needed for the services to run.
Re:We need better support for SSH host certificates by PeterisP on Monday March 27, 2023 @03:43PM (#35331368)
I've seen the exact opposite configuration where it's not possible to avoid SSHing from one remote server to another due to network segmentation, as on the network level it's impossible to access any production system directly via SSH but only through a jumphost, which obviously does not have a browser installed.
Re:We need better support for SSH host certificates by hamburglar on Thursday March 30, 2023 @01:38AM (#35368513)
You don't need the jumphost to do the auth for the target host. You use -J and the auth happens locally and is proxied through.
Re:We need better support for SSH host certificates by hamburglar on Monday March 27, 2023 @11:52AM (#35328244)
Never. I’ve been at this company for 8 years and owned literally thousands of hosts and we have a policy of no agent forwarding. I’ve always wondered when I would be limited by it but it simply hasn’t come up. It’s a huge security problem, so I’m quite happy with this.
Re:We need better support for SSH host certificates by hnlmorg on Tuesday March 28, 2023 @03:33AM (#35337108)
I can count on 1 hand the number of reasons I might need to do that and on each occasion there’s usually a better approach.

To be clear, I’m not suggesting the GPs approach is “optimal”. But if you’ve gone to the trouble of setting that up then you should have already solved the problems of data sharing (mitigating the need for rsync), network segregation and secure access (negating the need for jump boxes), etc.