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

non-default ssh port support #26

Closed
menway opened this issue Feb 18, 2014 · 5 comments
Closed

non-default ssh port support #26

menway opened this issue Feb 18, 2014 · 5 comments

Comments

@menway
Copy link

menway commented Feb 18, 2014

Hi arunoda, today when I tried meteor-up on a server with ssh service listening on non-default port (22), it seemed that meteor-up didn't support this scenario yet. I tried to append ":port" to the host field and tried to add a new field "port" in mup.json but both failed. I took a glance at your code then and found meteor-up didn't support port yet and it used your another package nodemiral to do scp operations and I didn't see nodemiral support specific port either.

According to scp help, -P parameter is for port. Could you please add this support to meteor-up and nodemiral? Thanks a lot.

usage: scp [-12346BCEpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2

@arunoda
Copy link
Owner

arunoda commented Feb 18, 2014

Yes. Good one. I don't thing I can work on this pretty soon.

For now you can a port forward tool. Forward all traffic to your
localhost:22 to the port you want on the remote server.

I welcome patches. This is the place you need to work on:
https://github.com/arunoda/nodemiral/blob/master/lib/session.js

On Tue, Feb 18, 2014 at 9:51 AM, Wei Meng notifications@github.com wrote:

Hi arunoda, today when I tried meteor-up on a server with ssh service
listening on non-default port (22), it seemed that meteor-up didn't support
this scenario yet. I tried to append ":port" to the host field and tried to
add a new field "port" in mup.json but both failed. I took a glance at your
code then and found meteor-up didn't support port yet and it used your
another package nodemiral to do scp operations and I didn't see nodemiral
support specific port either.

According to scp help, -P parameter is for port. Could you please add this
support to meteor-up and nodemiral? Thanks a lot.

usage: scp [-12346BCEpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2


Reply to this email directly or view it on GitHubhttps://github.com/zodern/meteor-up/issues/26
.

Arunoda Susiripala

@arunoda http://twitter.com/arunoda
http://gplus.to/arunodahttps://github.com/arunoda
http://www.linkedin.com/in/arunoda

@rick-golden-healthagen
Copy link
Contributor

I found a quick fix to this.

Insert the following if statement at line 39 in the file
https://github.com/arunoda/meteor-up/blob/master/lib/actions.js
[ just before "sessions.push(nodemiral.session(host, auth, options));" ]

if (server.port) { options.ssh.Port = server.port }

Then 'port' joins 'host, 'username', 'password' and 'pem' as a config property in the 'servers' part of the config file.

Works for me.

@arunoda
Copy link
Owner

arunoda commented Mar 27, 2014

Exactly. That's clever. Can you send me a Pull Request on this. I'm happy
to accept.
rather than for just for the port, allow to configure any SSH option.

So, we can accept an object called sshOptions from the mup.json.


Arunoda Susiripala

@arunoda http://twitter.com/arunoda
http://gplus.to/arunodahttps://github.com/arunoda
http://www.linkedin.com/in/arunoda

On Thu, Mar 27, 2014 at 5:34 AM, Rick Golden notifications@github.comwrote:

I found a quick fix to this.

Insert the following if statement at line 39 in the file
https://github.com/arunoda/meteor-up/blob/master/lib/actions.js
[ just before "sessions.push(nodemiral.session(host, auth, options));" ]

if (server.port) { options.ssh.Port = server.port }

Then 'port' joins 'host, 'username', 'password' and 'pem' as a config
property in the 'servers' part of the config file.

Works for me.


Reply to this email directly or view it on GitHubhttps://github.com/zodern/meteor-up/issues/26#issuecomment-38755648
.

@rick-golden-healthagen
Copy link
Contributor

done.
zodern/meteor-up#35

@arunoda
Copy link
Owner

arunoda commented Apr 17, 2014

merged #35 and released under 0.3.0

@arunoda arunoda closed this as completed Apr 17, 2014
chub pushed a commit to chub/magic-up that referenced this issue Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants