Hacker News new | past | comments | ask | show | jobs | submit login

I have two-byte aliases for ssh to all of the hosts I use commonly, doesn't everyone? (It even reattaches my remote screen session.)

Why would I want to touch the mouse?




Why is this even a question? It's a tool that someone will want to use. As long as there is a mouse, there will be tools that use it. You are essentially asking 'why does this tool exist', which is an irrelevant question and is needless negativity.


I'm not sure that is completely fair. He was just making the point that using only your keyboard is much faster and there are already built in tools for doing that. He may have just been asking why someone would want to use a mouse over a keyboard for this type of thing.


And the parent's point is that "why doesn't everybody use all keyboard shortcuts all the time" is a HN refrain that is tired and smug, and yet still the top-voted comment here.


And the answer is because ssh is entirely keyboard driven. There is no good reason to clumsily mouse through a drop-down menu, then move your hand back to your keyboard, when you can type "zz<enter>" in an open terminal and you're ready to go!


Cool, how do you do that with a dynamically changing list of hosts that you're getting from somewhere else? I would totally use this with a team dropbox and a .shuttle.json file full of all of our systems.

Or, put another way: think beyond your own use case before posting, yeah?


Crontab a job to generate the aliases and write them to a file, source the file from .profile. Alternately, store the list in an alias-defining file instead of json. Source directly from the dropbox.

No installation required.


Tab completion?


Normally, sure. But we're talking about opening a remote keyboard-interactive ssh session in this specific case.

Your hands are going to the keyboard.

We're discussing whether or not it's worth screwing around with the mouse beforehand.


This was my first thought too, but then I considered the case where I'm already using the mouse and want to open a terminal and ssh to an app server. With this it would be two clicks, where without out it requires a move to the keyboard, a hotkey, and two keystrokes. However, moving to the keyboard is necessary after the SSH anyway, so that step doesn't really count against the latter.

Is it for me? I'll try it, but I don't think so. But I think it serves a need for some people, and I can always get behind ideas that serve or improve--successful or not--workflow/dev needs.

Great work Trevor!


Command-space t e r enter

Command-n

zz enter


Yes, I could memorize this and 2000 other arbitrary shortcuts. Or, you know, I could use the mouse.

The times per day I open a new SSH session (and I'm a heavy SSH user) are so miniscule that keyboard vs mouse wouldn't do anything than give me a false sense of superiority.

That said, I already know this Spotlight shortcut, and yet I fail to see how eleven (ELEVEN) keypresses as described above are any better than lazily moving my mouse and clicking on a dropdown menu.

No, I don't want to "have my hands down on the keyboard all the time", like they are glued there. Not even when I'm programming. I'm drinking my coffee at the same time, for one.

And my commits (including typed and discarded code) are no more than 1000 lines per day. I could write those in 5 minutes, if keyboard dexterity was all it took to program.

So fuck yeah, I'll move my hands. I move them anyways, to interact with graphical elements that do need a mouse, to drink my coffee, to grab a pen and pencil and do some rough sketch, to scratch my neck, to answer the phone, to fix my glasses and tons of other things. And to not have them go numb.


First, Cmd+space i enter, a enter saves 6 key strokes.

Second, why would you open a new terminal window, then immediately open a new terminal window?

Third, I accounted for this in my post.

Finally, what kind of response is this? Are you posting a how-to? Are you making a counter point? Are you just being snarky?


Terminal is always open. Hitting it from spotlight just foregrounds it.


Answer: as a browser for hosts you don't use commonly.

Long ago I wrote a similar ssh target browser, in just a few lines of Perl/Tk, that pulled all the hosts from my then-employer's server database (several hundred of them, thousands if you included our dev/test VMs, and constantly changing) and created a simple tree view for reviewing and navigating the set, based on location, functional role, sequence number, customer, software level etc.

Also handy/dangerous was having it launch mirrored gterms for a given set.

Half the staff used this tool. I'd be surprised if most admins of moderate-to-large installations didn't have something similar.


Curious. How do you automatically reattach screen? Thanks!


ssh -t myhost.example.net 'screen -D -RR'




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: