rpwoodbu / mosh-chrome

Mosh for Chrome
GNU General Public License v3.0
372 stars 59 forks source link

ssh key #129

Closed ghost closed 8 years ago

ghost commented 8 years ago

How do I use mosh without having to enter a password every time? I tried the following:

rpwoodbu commented 8 years ago

Please see the wiki page on key-based ssh auth. Let me know if that page needs to be improved to answer your question.

Note that if you have a passphrase on your key, you will be prompted for that every time. There's no ssh agent (see Issue #78). See the warning in about passphrase-less keys on the aforementioned wiki page (4th bullet). Caveat emptor.

ghost commented 8 years ago

I'm really sorry to bother you but I can't get it to work for the life of me. Could you make it a step-by-step, noob-proof tutorial instead of assuming prior knowledge? Again, sorry to bother you

rpwoodbu commented 8 years ago

Well, everyone's setup is a little different, and I don't really want to hash out the whole of setting up ssh key auth (which is documented all over the Interwebz). So let's see if we can figure out your specific problem, then see if it is appropriate to modify the wiki page.

First, do you have passphraseless ssh key auth working with plain-old ssh from some *nix machine to the server in question? If not, get that working first. If you don't have another non-ChromeOS machine to use as a client, then use the server as its own client by doing ssh localhost.

ghost commented 8 years ago

I have added the content of the id_rsa.pub file on my Chromebook shell to the authorized_keys file on my Raspberry pi, and that works fine, I can just do ssh pi@IPADRESS and it gets me in the pi's shell directly. My problem is with the mosh application.

I don't care about the security problem, that's not really important to me as I keep my Chromebook with me at all times and would be able to revoke the authorization if someone else has had access to it. I copied the content of id_rsa.pub from my Chromebook's shell to the mosh app, that didn't work. I then tried the same with everything that even remotely resembled a key to try and make it work, no dice. I think I'm missing something very obvious here, but this is getting annoying.

Also, is there a way to use this in a tab rather than a window? I swipe between tabs with the trackpad gesture and this kinda interrupts my workflow

Op wo 31 aug. 2016 om 22:33 schreef rpwoodbu notifications@github.com:

Well, everyone's setup is a little different, and I don't really want to hash out the whole of setting up ssh key auth (which is documented all over the Interwebz). So let's see if we can figure out your specific problem, then see if it is appropriate to modify the wiki page.

First, do you have passphraseless ssh key auth working with plain-old ssh from some *nix machine and the server in question? If not, get that working first. If you don't have another non-ChromeOS machine to use as a client, then get it working on the server by doing ssh localhost.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rpwoodbu/mosh-chrome/issues/129#issuecomment-243891757, or mute the thread https://github.com/notifications/unsubscribe-auth/AMhqQwqPpC1R48BFb9At_MG0BuxbinqHks5qleTTgaJpZM4JwRlW .

rpwoodbu commented 8 years ago

I have added the content of the id_rsa.pub file on my Chromebook shell to the authorized_keys file on my Raspberry pi

The public key cannot grant access to anything. That's kinda the point. 😉 You need to give Mosh for Chrome the contents of the id_rsa file (not id_rsa.pub), which contains the private key. Let me know if this fixes your problem.

Also, is there a way to use this in a tab rather than a window?

AFAIK, this is not an currently an option. Originally, Mosh for Chrome had to be a "packaged app" in order to get access to the chrome.socket.udp API. Such apps are always in a window, not in a tab. There's a "legacy packaged app" which can be in a tab (notably, Secure Shell), but that is deprecated. Even if it weren't, it may still not have the necessary APIs.

Although the Chrome App landscape has changed a lot since I began this project (including the deprecation of Chrome Apps on Linux, Mac, and Windows 😢), I think this is a fair reflection of the current state of things. Please let me know if I'm missing something, as several users have asked for this to be in a tab.

ghost commented 8 years ago

Fuck I feel stupid now. Sorry for bothering you. Cheers