Live data from Hacker News

Show HN: I built a simple, open-source tool to manage servers and SSH keys

github.com

71–80 of 97 posts

Re: Show HN: I built a simple, open-source tool to manage servers and SSH keys

#71
post #68

Earlier quoted context omitted.

CA's have a lot of management and logistical issues and potential for misuse. The simplicity and TOFU design of the SSH key system (which obv can bring along some issues of its own) can bring a lot of benefits, especially for people who don't want to introduce a CA or PKI. (obligatory disclaimer, I work at Userify and we have a server-side product that automates SSH key management and distribution. For example, the C…

> the CA design doesn't kick someone out once their access is removed, but Userify's shim actually terminates all of sessions instantly I was a bit confused at first, I thought you were saying ssh certificates couldn't be revoked - but I see you're talking about signing the user out from existing sessions. That is a fair point. I guess removing/locking a local user (in /etc/passwd, /etc/shadow) would typically leave…

Yes, you're exactly right. ( https://github.com/userify/shim/blob/master/shim.py#L209 )

We've thought about porting Userify to work with CA's too but haven't had many requests for that for some reason, even though I'm sure many companies do have CA's set up alongside their other PKI for SSH.

Re: Show HN: I built a simple, open-source tool to manage servers and SSH keys

#72

You are very close to solving a real business problem. The problem is not "how can I have SSH aliases on my computer" but "how can we manage, company-wide, who can access which SSH servers." My company currently uses YubiKeys to support hardware-based individual SSH keys. These SSH keys are distributed with Ansible. It works but is cumbersome and lacks a single pane of glass. What we would like to have: a list of ser…

[deleted]

Re: Show HN: I built a simple, open-source tool to manage servers and SSH keys

#73

You are very close to solving a real business problem. The problem is not "how can I have SSH aliases on my computer" but "how can we manage, company-wide, who can access which SSH servers." My company currently uses YubiKeys to support hardware-based individual SSH keys. These SSH keys are distributed with Ansible. It works but is cumbersome and lacks a single pane of glass. What we would like to have: a list of ser…

there is the AuthorizedKeyscommand feature that allows for a command to fetch keys not yet existing on a system. Gitlab uses it to fetch keys from a database, for central user and access management. They also ship a own sshd implementation which does kinda neat lookup things for very big databases.

theres already projects solving central ssh key management, for example:

https://github.com/ierror/ssh-permit-a38 (distributes via authorized keys)

https://github.com/netlore/OpenAKC

https://tenshidev.medium.com/centralized-ssh-authentication-...

and

https://docs.gitlab.com/ee/administration/operations/fast_ss...

Re: Show HN: I built a simple, open-source tool to manage servers and SSH keys

#74

You are very close to solving a real business problem. The problem is not "how can I have SSH aliases on my computer" but "how can we manage, company-wide, who can access which SSH servers." My company currently uses YubiKeys to support hardware-based individual SSH keys. These SSH keys are distributed with Ansible. It works but is cumbersome and lacks a single pane of glass. What we would like to have: a list of ser…

Is everyone just logging in as root or something?

Re: Show HN: I built a simple, open-source tool to manage servers and SSH keys

#75

Question: What is the specific advantage I get from using $ viking machine add --name deathstar --key starkey 168.112.216.50 $ viking exec --tty deathstar /bin/bash Over putting the following in my ~/.ssh/config Host deathstar HostName 168.112.216.50 User my_user IdentityFile ~/.ssh/starkey And then just typing $ ssh deathstar ?

as someone who dislikes config files to an extreme degree (hidden information, commands stop being portable) a modern cli that allows me to manage my configurations seems very useful

> as someone who dislikes config files to an extreme degree

This tool has a config as well. From the repos readme:

    Viking saves data locally. Set VIKING_CONFIG_DIR env variable for a custom directory. Use viking config to check the current config folder.
> hidden information

What exactly is "hidden" about ~/.ssh/config ? It's a plaintext file in a format that is the same across every single machine that uses openssh, which is pretty much every *nix box on the planet.

> commands stop being portable

How is using literal `ssh` not portable? If you're talking about the ssh config: That is a plaintext file that can be checked into a repo and simply downloaded to any machine I want. And again: viking too has a config.

> a modern cli

    host=$(
        awk '$1 == "Host" && $2 != "*" {print $2}' "$HOME/.ssh/config" |
        fzf --reverse
    )
    [[ -n host ]] && ssh "$host"
There. I just built a modern, interactive tool to chose a server from my ssh config. It requires only fzf as a non-standard dependency, a tool that is present in pretty much every package repository.

> allows me to manage my configurations

    vim ~/.ssh/config
There. A powerful, searchable, portable way to manage my SSH configuration. I can even use comments, and have access to all ssh settings available. All dependencies come preinstalled on most *nix boxes.

Re: Show HN: I built a simple, open-source tool to manage servers and SSH keys

#76
post #30
post #16

Earlier quoted context omitted.

Just imagine that DNS doesn't exist. Or hosts files. Or `~/.ssh/config`...

Well I can imagine working in a cheapo shop where you cannot have public technical domain or setting up DNS is "too much to spend on". But hostfile well if you have to share it with 2-3 other people might be a hassle?

That's why ssh config allows setting up alias names for servers.

Re: Show HN: I built a simple, open-source tool to manage servers and SSH keys

#77
post #13
post #3

So, congratulations on releasing your project but I'm not sure what problem are you trying to solve. Please add some use-cases to make it clear where exactly does it come in, because once I add a key in my ssh config, I'm pretty much there. For more complicated tasks I use ansible.

Thanks! - No need to remember server IPs - Viking gives you an overview with simple machine ls and key ls commands - A more modern and intuitive API - Works consistently across all platforms - Close to the Docker API Sure, it’s only the first release. It may not seem like much now, but with feedback, the project will move closer to the goal.

Like other commentators have already mentioned but the openssl suite already solves these problems and even more complex ones

For example:

Specifying different keys different servers

Host github.com

    User git

    IdentityFile ~/.ssh/id_rsa_github
Host myserver

    User username

    IdentityFile ~/.ssh/id_rsa_myserver
Reuse SSH connections for multiple sessions

https://blog.scottlowe.org/2015/12/11/using-ssh-multiplexing...

https://blog.poespas.me/posts/2024/04/27-optimizing-ssh-conn...

Host *

    ControlMaster auto

    ControlPath ~/.ssh/sockets/%r@%h-%p

    ControlPersist 600
Other than that, you can also do ssh agent forwarding, port forwarding etc. These are all crucial functions that user like me need when we access remote machines.

I hope you take this as constructive criticism and not a knockdown on your work. You've created and released something that's great but this site usually brings more advanced users.

Re: Show HN: I built a simple, open-source tool to manage servers and SSH keys

#78
post #19
post #13

Earlier quoted context omitted.

Thanks! - No need to remember server IPs - Viking gives you an overview with simple machine ls and key ls commands - A more modern and intuitive API - Works consistently across all platforms - Close to the Docker API Sure, it’s only the first release. It may not seem like much now, but with feedback, the project will move closer to the goal.

>No need to remember server IPs On your local machine under ~/.ssh/config you can add something like #PERSONAL Host vpn-us HostName 1.2.3.4 User my_fun_username Port 1212 now you can ssh using ssh vpn-us (above is the same as the following command --> ssh my_fun_username@1.2.3.4 -p1212)

Also you can organize servers into different config files and Include them your base config,.

  $ cat .ssh/config
  # Fictitious example
  Include work.config
  Include personal.config
  $ 
https://man7.org/linux/man-pages/man5/ssh_config.5.html

Re: Show HN: I built a simple, open-source tool to manage servers and SSH keys

#79
post #19
post #13

Earlier quoted context omitted.

Thanks! - No need to remember server IPs - Viking gives you an overview with simple machine ls and key ls commands - A more modern and intuitive API - Works consistently across all platforms - Close to the Docker API Sure, it’s only the first release. It may not seem like much now, but with feedback, the project will move closer to the goal.

>No need to remember server IPs On your local machine under ~/.ssh/config you can add something like #PERSONAL Host vpn-us HostName 1.2.3.4 User my_fun_username Port 1212 now you can ssh using ssh vpn-us (above is the same as the following command --> ssh my_fun_username@1.2.3.4 -p1212)

One thing I wish ~/.ssh/config had was more slightly powerful matching. I think all you get for dynamic matches is * and ? instead of a regex syntax. Works probably 99% of the time.

Re: Show HN: I built a simple, open-source tool to manage servers and SSH keys

#80

You are very close to solving a real business problem. The problem is not "how can I have SSH aliases on my computer" but "how can we manage, company-wide, who can access which SSH servers." My company currently uses YubiKeys to support hardware-based individual SSH keys. These SSH keys are distributed with Ansible. It works but is cumbersome and lacks a single pane of glass. What we would like to have: a list of ser…

Interesting use case, I'll definitely consider it. Thanks for sharing.
Post reply on HN