6 ms·
I'm here to answer questions anyone has about this. It's a newish feature so feedback is welcome, and bug reports are greatly appreciated. Also, credit goes to
by gnachman 11y ago
I'm here to answer questions anyone has about this. It's a newish feature so feedback is welcome, and bug reports are greatly appreciated.
Also, credit goes to FinalTerm for the inspiration. RIP.
- lemevi 11y agoAs an iterm2 and fish shell user I appreciate the work you guys are doing on bringing this to fish. Thank you! :)
- Tombar 11y ago+1
- matt4077 11y agoI'm using a german keyboard and the shortcut cmd-; is inaccessible because ';' is shift-, I couldn't find a way to customise the shortcut in options. Sorry if I was too stupid to find it. Great work otherwise.
- hmottestad 11y agoSame here in Norway (and the entire Scandinavia).
- kawsper 11y agoLots of stuff seems broken by default if you are on an exotic layout. I am on a Macbook with a Danish-layout, and ALT+ARROW_LEFT/ARROW_RIGHT doesn't work out of the box in iterm2, however it seems to work if you rebind, or type this into .inputrc: "\e\e[D": backward-word "\e\e[C": forward-word I'd love to switch to an american keyboard, because lots of Unix things seems impossible to type with my current keyboard, but maybe I am just being stupid.
- pi-rat 11y agoI switched from a Norwegian keyboard to a UK keyboard with intl. English map on my MacBook. Default keyboard shortcuts suddenly made so much more sense - and I can code without having to use my nose when I run out of fingers for modifier keys. ()[]{}\|/:;' are all available using at most a single modifier (many of them without). Scandinavian characters are available using a single modifier for when I don't code, ex alt-a for å. Definitive productivity boost for me.
- tracker1 11y agoOn the one hand, I appreciate that English is as pervasive as it is in software engineering, being an American... on the flip side, it's a bit disappointing how little effort is often made to make sites and applications less friendly to foreign inputs and layouts (including inputting names).
- gnachman 11y agoGood to know. You can customize shortcuts by going to prefs>keys. Click the + to add a new key mapping. Press the shortcut you want. For Action choose "Select Menu Item…" and then find the item you're looking for in the popup menu that appears (Edit>Open Autocomplete…, in your case).
- brians 11y agoThanks for your hard work and generosity. How should we think about the security story when sshing from a more trusted to a less trusted host?
- gnachman 11y agoGreat question! When installing, especially on an untrusted host, follow the manual installation instructions. The menu item will just output a curl|bash command (currently; this will likely change in the future). If the host is really untrusted you're screwed, of course. Bad guys could modify your ~/.iterm2_shell_integration.bash and you'd never know. But this script is not special in any way (except that it's kinda complex and is run automatically). Maybe hash it from time to time if you're really paranoid. The scripts assume that various things in your path are safe to run. printf, hostname, sed, echo, etc. If those are compromised you're in a bad way, and I don't think shell integration exposes anything that ordinary use wouldn't. If you've been compromised badly enough that an attacker can decrypt your ssh session, your current directory will be revealed at each prompt. But it probably is since most people have that in their $PS1 anyway. Also the host's idea of its fully-qualified domain name. Probably the most risky aspect of shell integration is the secure copy feature. It's possible that there's a bug in my use of libssh2 or that there are unpatched vulnerabilities in an out-of-date build of iTerm2 (or an up-to-date version of iTerm2 with an out-of-date libssh2). I try to stay on top of changes to libssh2 but I am human and Sparkle (the auto-updater) is not flawless either. That's all that comes to mind. I'm sure other folks on here can think of more interesting attacks or vulnerabilities.
- geofft 11y agoIs there a risk of the untrusted host injecting things into the shell output without permission? It looks like there's no authentication, so if I SSH somewhere untrusted that can output raw characters to my shell (which, I believe, includes git pushing over SSH, etc.), it can output the right escape sequence and insert false things into my shell history. With further cleverness, it could almost certainly inject things that look like commands I would have run but actually run evil things. I don't have a great solution to suggest for this. One option is to add some sort of per-user static password to the escape sequence, and insert it in the file that's copied to each (trusted) host, but that just seems questionable. A better one might be to make the communication use a socket instead of an escape sequence, and forward the socket (recent OpenSSH can forward UNIX domain sockets) to trusted hosts, but that's its own mess. This is such a useful feature, though, especially with remote hosts. It'd be a pity if it can't be done securely. :/ (While we're on the subject of security, there's an obscure attack involving interrupting the download of a `curl | sh` script -- which a MITM can do, even over SSH -- and relying on the shell to execute a partial command line. I learned about this from the Sandstorm folks, who have a workaround in https://install.sandstorm.io/ https://install.sandstorm.io/ involving the sh equivalent of an IIFE.)
- jakejake 11y agoThis looks really cool. One question - if I'm tunneling through one server to the next (required for me to access production servers) does the file upload/download still work?
- gnachman 11y agoAs long as it's reachable from your client. I answered elsewhere in this thread on how to upload and download if not.
- fit2rule 11y agoIs iTerm keeping my history safe? Where is it saved, and how is it kept safe?
- lemevi 11y agoDo you think your regular bash history is safe? Relevant: https://xkcd.com/1200/ https://xkcd.com/1200/
- fit2rule 11y agoI don't. Which is why I'm hoping iTerm is different.
- lemevi 11y agoSo you want your bash history safer than your private ssh keys? Like at userspace, there's very little point in protecting anything. Just lock your computer when you walk away from it.
- fit2rule 11y agoI want my bash history encrypted so that it can't be read by anyone who might gain access to my machine.
- gnachman 11y agoIt's stored in ~/Library/Application Support. Whether that's safer than your shell's own history depends on your personal threat model. You can turn off "Prefs>General>Save copy/paste and command history to disk" to disable this if your mac is untrusted.
- schrodinger 11y agoTypo: "respsects"
- schrodinger 11y agoApologies for the really short comment, I was just pointing out you've got a typo on the page: >iTerm2 respsects ssh_config files, but only a subset of the commands are understood: Just trying to be constructive!
- kolev 11y agoIt somehow breaks my virtualenv prompt...
- chrisshroba 11y agoSame here - it multilined it
- empath75 11y agoI use ssh jump hosts a lot with ssh keys. I imagine the scp download only downloads directly? It seems to always ask for passwords.