Show HN: Invite friends to SSH into your laptop using their GitHub handle
gravitational.com
gravitational.com
I use the following incantation when authorizing folks to ssh into my servers via github public keys:
curl https://github.com/[github name].keys >> ~/.ssh/authorized_keys
[github name] here should be replaced with github username of your friend or colleague. Really handy because I can just authorize them without a human request/response loop and manual key moving. Simple and no external tools needed. Normal caveats about authorizing people apply.Didn't know about that, thanks!
Edit: Better source.
[0] https://blog.benjojo.co.uk/post/auditing-github-users-keys
In the general case, you should be fine. Even more so if the person whose GitHub account you are authorizing regularly checks their keys for suspicious activity.
The beauty of doing it this way (writing authorized_keys) is that the accounts are completely independent from a third-party auth service. (ok, I guess technically that's what we are, but we're only managing the public keys, and not directly authenticating through a remote server like a directory or database.) SSH has a beautiful design.
I would honestly highly recommend against using Teleconsole for those reasons.
Teleconsole is an instant VPN+SSH in one command and it would be wise to educate yourself on what it does (reading just the 1st sentence of the blog post would be a good start) before recommending anything.
ssh-import-id-gh <username>
It also works with launchpad (of course):
ssh-import-id-lp <username>
(It does exactly the same but is shorter to type)
EDIT: typo
# JSON
Interesting - but how can we trust you?
How can nodes register with the Teleport service on provision?
Do you integrate with third party authentication services like HashiCorp Vault?
Vault is not yet supported but PR's welcome :)
edit: Looks like there's an open issue for consul to start: https://github.com/gravitational/teleport/issues/423
I suppose if you have an Internet-facing server to run teleport on, there are fewer reasons to use teleconsole - but I could see it still being useful? (for eg help troubleshooting workstations or servers/clusters behind firewall/Nat for people outside the organisation - volunteering, "helping a friend" or consulting)?
teleconsole -i other_users_github_id
my teleconsole session ID would be sent to server along with my Github ID (optionally other user's too) so that they could teleconsole -j my_github_id
to join instead of having to share session ID and fumble around with that.No more/less secure that I can see, but it would be more convenient.
I'm trying to imagine the situation that makes that worth supporting?
That's not going to be a development server used by an entire team, for example, because whose Github credentials would be on it?
Even so, it could just give a list of session IDs in such a case, and ask which of 1/2/3. The additional complexity is only that the lookup value is a list of strings instead of a single one, surely?
I've run into many situations where I'm remote and need to SSH into a NATed machine to fix something, and I typically will SSH reverse tunnel to a VPS.
From the NATed machine:
ssh -fN -R52222:localhost:22 user@publichost
And then from the public machine: ssh user@localhost -p 522221. Why would I want someone to ssh into my machine -- at least with the frequency that a service to help me do it is valuable?
2. How is this easier/better than saying 'hey bro whats your ssh pub id? -- eh.. do `cat ~/.ssh/id_rsa.pub`
Over all this seems like a tool that only super technical people would ever use, and for those people adding a key to authorized keys is trivial.
If I am feeling paranoid about the user on the other side, I only share just the read-only link, or the web link.
That little command will pull down your GitHub public keys and add them to authorized key file for the user who runs it. Great for setting up new computers. I run it on boot-time for imbedded devices so that I can always access them.
Edit. Seems they are way ahead of me: https://github.com/dustinkirkland/ssh-import-id/blob/master/...
- You can do in one line of bash: curl https://github.com/user.keys >> ~/.ssh/authorized_keys - The bash one-liner is transparent and educational: it tells you clearly and intuitively where the keys are coming from and where they're going, educating users about the existence of the Github/Gitlab-published keys and about how the authorized_keys file works
You seem to require a lot of code, and lose a lot of very real advantages, for the sake of a bit of brevity. What are the other advantages of this tool?
You talk like phishing and privilege escalation weren't things that exist. Have you ever managed any public-facing service of any importance?
I would note that using biased arguments is an inefficient process in most cases. It's akin to recursion of a process which, in my experience, has brought many a more server to its knees than a hypothetical threat from double authorized access (hash + key).
http://blog.endpoint.com/2009/09/gnu-screen-follow-leader.ht...
Shouldn't it be possible to use the central server only for hole-punching and implement a TCP-over-UDP connection so that the clients can directly communicate with each other? (And don't the major browser vendors already have public NAT-hole-punchers for WebRTC?)
My first thought.
Also, the server and code may be secure, the weakest point is a person. cf: "You can share the Session URL with a colleague in your organization. Assuming that your colleague has access to teleport.example.com proxy, she will be able to join and help you troubleshoot the problem on "db" in her browser." ~ http://gravitational.com/teleport/docs/quickstart/
"curl https://www.teleconsole.com/get.sh | sh "
Still considered even a remotely acceptable method for installation?
If you're claiming that you don't get the ability to audit the code, I'd like to watch you audit a ./configure shell script generated by GNU autoconf.
If you're claiming that you want to apt-get install so the package maintainer has audited the code, I'd like to watch them audit the ./configure shell script.
Downloading and auditing code from an untrusted source is security theatre. Don't install it at all, if you don't trust it. Or use some platform (the web, iOS, Android, Qubes, etc.) that makes it such that there's no need to audit it because the app is restricted in what it can do.
I'm being facetious as the answer is there isn't one
That's not correct. In most distros, installing packages from your distro's repositories has an additional security guarantee: the packages you download have their PGP signatures verified before installation. If an attacker compromises the web server and alters the package, your package manager will reject it as it's not signed by a trusted key in your keyring.
github-pair (https://github.com/chilicuil/shundle-plugins/blob/master/ali...)
github-unpair (https://github.com/chilicuil/shundle-plugins/blob/master/ali...)
Those add / remove keys from github to ~/.ssh/authorized_keys
Even re-using your daily system user, for this, is a security issue.
But if you never did read the sshd_config man page, or never did play with its options, maybe you're unaware of this.
Also the sshd could be modified at source level.
Stuff like:
https://m.theregister.co.uk/2016/01/14/openssh_is_wide_open_...
seem to indicate that a patched ssh client should (no longer) leak private keys without the -A parameter...
Your machine, being an SSH server, gets to decide who can login. The encryption works just with any normal SSH session: between the end user and the server (your machine).
The cloud bridge running on https://teleconsole.com simply acts as a proxy connecting sockets between two users who are behind NAT (without being able to decrypt).
Disclaimer: I'm the author of Teleconsole. [edit: formatting]
The proxy accepts two incoming connections: from your server and from the client, then it bridges them and allows the client to negotiate an SSH handshake with the server.
Presumably all this does is spawn a local SSH server with the appropriate authorized_keys file, and forward the TCP connection through the company's servers for NAT traversal. The actual connection is encrypted end-to-end.
https://github.com/PeopleAdmin/tweemux
It's pretty neat.
[0] - https://github.com/gravitational/teleconsole/blob/master/lib...
"It seems like a big risk to allow a little-known cloud service to authorise SSH access to your laptop. What are the use cases for this? What do you need to be careful of?"
I'm not clear though - I'm to expect hackernews has rules which demand I weasel-word my criticisms? That seems ridiculous.