myplaceonline / posixcube

posixcube.sh is a POSIX compliant, shell script-based server automation framework.
MIT License
170 stars 6 forks source link

how to use a ssh port other than 22? #11

Closed laoshaw closed 7 years ago

laoshaw commented 7 years ago

how to pass a different ssh port, and other ssh options in general?

kevgrig commented 7 years ago

Currently not supported, but I can add that. Do you just need -i and -o or something more?

kevgrig commented 7 years ago

I like your commit. The only thing I'm going to change is to use -p instead of -t which will require renaming the current -p argument. So first I want to implement Issue #7 (semantic versioning)...

kevgrig commented 7 years ago

This is now supported in the latest master:

posixcube.sh -p 2222 ...

If you'd like to be added to the list of authors, please let me know how you'd like your name and/or email displayed.

If this is resolved for you, please close this issue.

laoshaw commented 7 years ago

username laoshaw21. Thanks for improving this. similar project: https://github.com/ParallelSSH/parallel-ssh

kevgrig commented 7 years ago

@laoshaw Thanks, I've added you to the contributor list. Regarding parallel-ssh, posixcube already supports that on Bash. If Bash is detected, then by default, the initial preparation SSH and rsync run asynchronously. In addition, the optional -a option will run the main executions in parallel as well. I disabled -a by default because right now posixcube just flows stdout back to the user's console, so if anything on the remote end is writing stdout outside of cube_echo, and if that happens at the same time while using -a, then output lines will be intermingled. I guess we could pipe ssh output through something that replaces newlines with cube_echo in that case.