Blink: Import Hosts from .ssh/config file

Created on 3 Nov 2017  Ā·  24Comments  Ā·  Source: blinksh/blink

Similar to #45, I'd like to be able to bring in my hosts file to quickly bootstrap my Hosts list. I realize the ssh config capabilities are pretty powerful, but being able to import the most simple configurations of an alias, server, port, username, etc. would be very useful for folks with extensive destination lists so they can avoid manually entering these.

RTT feature

All 24 comments

Agreed. Are you keeping it in sync somehow too?

I have my ssh config in my dotfiles. If Blink could read this from a clone of my dotfiles cloned in Working Copy, that would be aces.

I would like to +1 this request. Being able to bulk import hosts from a text file would be very helpful. I manage 1000+ systems, having the ability to import them all at once would be wonderful.

Libssh comes with this built-in. We could probably migrate our custom format to that, but I don’t know how we would be able to handle mosh configuration there too.

I like @jxpx777 idea of making it available and synchronizable somehow all the time, even if then the Hosts aren’t visible in ā€œSettingsā€. Maybe this could be a switch to use the synced file, and then manually trigger refreshes? Any ideas?

Is it possible to write a python script to parse my ssh config and sync it via iCloud on Mac OS?

I think it is easier and more strait forward iOS to support config files. Actually current TF version can pickup some settings from .ssh/config already.
If you can post examples of your configs we can try to test that.

I would love to see support for a .ssh config file.. Even if MOSH wasn't supported. The issue for me is I have over 200 different servers I need connection to, and nearly all of them use a different key. There needs to be an easier way than to manually add every single key and host definition to the config screen in the client. I would be willing to help implement this if a core dev didn't have time to do it.

Hi @Jewsh-S,

Next version (12) will support .ssh/config and keys from .ssh folder.

What it can parse:

HostName
Port
User
IdentityFile
ProxyCommand

IdentityFile can be filename in .ssh folder or blink key name.

Note: Hosts configured in .ssh/config will not appear in command completion yet.

Has this feature shipped?

Yep

@yury Could you share the way how to upload .ssh/config into to ios, so blink can use it. Thank you.

@axot, see my reply here #474

Hi @yury, after following your guide, I successful copy config into blink, when I try to ssh some_host, the command returned directly, is there any verbose log I can troubleshoot?

Yep, ssh -v[vvvvvv] will give you ton of debug info

@yury I got error with

ssh_packet_userauth_failure: Access denied for 'none'. Authentication that can continue: publickey,gssapi-keyex,gssapi-with-mic

any idea?
Thank you.

That is ok, error is actually somewhere below. How many v did you use?

@yury I used ssh -vvvvvv some_host last time, and User in .ssh/config may not work? After changing default user in config, ssh works!

It could, I will check that. Thank you.

Hi @axot,

Fix will be in next version (v12.9)

Hi,
I copied the .ssh/config file and I think the system reads it, because it uses the port and identify file from it. But when I try to login the verbose log says that it can't read the keyfile:
blink: warning: no key found: '~/.ssh/id_rsa_xxx'

But 'cat ~/.ssh/id_rsa_xxx shows' shows the content of the file.

Does any one know why it can't read the keyfile?

Thanks, Ingo

Hi Ingo!
Please check whether your private key is world readable; this should not be the case. Also, check the permissions of the parent .ssh.
Cheers

Hi schwammerl,
thanks for your comment. How can I change the file permissions? I don't have a chmod in blink.

Regards, Ingo

You got a point there... Sorry, didnā€˜t consider that :-/

You can add chown/chmod to the ios_system framework, than you can use it:
https://github.com/holzschu/ios_system

But it was just an error in the config: I had ~/.ssh/keyfile which do not work in the sandboxed iOS FS. I changed it to ./.ssh/keyfile. Than it worked.

Regards, Ingo

Was this page helpful?
0 / 5 - 0 ratings

Related issues

treyharris picture treyharris  Ā·  3Comments

s8m2s picture s8m2s  Ā·  5Comments

proportional picture proportional  Ā·  3Comments

dlasky picture dlasky  Ā·  4Comments

jra picture jra  Ā·  5Comments