Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add remote ssh port as configuration parameter #241

Open
artem-zinnatullin opened this issue Nov 26, 2018 · 7 comments
Open

Add remote ssh port as configuration parameter #241

artem-zinnatullin opened this issue Nov 26, 2018 · 7 comments
Assignees
Milestone

Comments

@artem-zinnatullin
Copy link
Contributor

Right now we fully rely on ~/.ssh/config implicitly processed by ssh and the fact that default port is 22, adding it on our config level will allow project-specific overrides as part of #213.

@arturdryomov
Copy link
Contributor

Not sure what the use case there is. Multiple ports on the remote machine?

@artem-zinnatullin
Copy link
Contributor Author

Well, not everyone maintains ~/.ssh/config for every host, ie I have couple hosts I ssh into that have ssh running on non standard port and I don't have them in my ~/.ssh/config

@arturdryomov
Copy link
Contributor

I would still suggest to configure SSH for this. Then the configuration can be applied not only to MF. Using a remote machine still involves using SSH from time to time — to clear caches, kill processes, test excutables. We even mention using SSH to test the connection before configuring MF in the first place.

@artem-zinnatullin
Copy link
Contributor Author

The reason why I want to allow configuring these things on Mainframer side (including cli params),

is to make Mainframer more friendly for automation in different environments, including CI or scripts, etc where configuring ~/.ssh/config may be unreasonable

@arturdryomov
Copy link
Contributor

That’s understandable for sure, but at the same time it either means password-based auth and no performance improvements like ControlPersist.

@arturdryomov
Copy link
Contributor

Before I forgot. There is a middleground. We can provide an option to create SSH key and put everything in .ssh/config for the user. Not sure it is worth it but probably can save some hassle.

@artem-zinnatullin
Copy link
Contributor Author

but at the same time it either means password-based auth

That's not true, default ssh key (~/.ssh/id_rsa) will be used without an entry in ~/.ssh/config for the remote host, which is what a lot of people use for everything, like GitHub.

no performance improvements like ControlPersist

True, prob not very important for automation setups and is configurable anyway if they want.

Before I forgot. There is a middleground. We can provide an option to create SSH key and put everything in .ssh/config for the user. Not sure it is worth it but probably can save some hassle.

Definitely not going to do that lol, that's a lot of work and potentially a security issue if we do it wrong.

We can hide SSH as implementation detail or embrace it, so far you (and I) have done the latter and it's just me bothering with some comments on your PRs to make ~/.ssh/config not look like strict requirement in setup docs :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants