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

[Fixes #168] Implementing command forwarding for external SSH #178

Merged
merged 2 commits into from Jan 23, 2017

Conversation

xmudrii
Copy link
Contributor

@xmudrii xmudrii commented Jan 3, 2017

With this PR, we should fix #168. However, this is not really same idea as it's in issue.
Issue is proposing following implementation:

doctl compute ssh mydroplet uptime

I decided to follow template of SSH unit, so I went with flag (--ssh-command).
When I execute doctl compute ssh mydroplet, I'll work as usual.
When I execute doctl compute ssh test1 --ssh-command uptime, it'll will only return output of command, as expected:

 22:32:26 up  1:07,  0 users,  load average: 0.00, 0.00, 0.00

I want to know do you like it, how it looks and could it be done better.
Just to note, this is only implemented for external SSH (OS X & Linux). I need to look more in Windows implementation of SSH client, but first I want to know is this one OK. If this is right, I'll do the same for internal if possible.

cc @nanzhong @aybabtme

@xmudrii xmudrii changed the title [Fixes 168] Implementing command forwarding for external SSH [Fixes #168] Implementing command forwarding for external SSH Jan 3, 2017
@mdlayher
Copy link
Contributor

Code looks good. Mind writing a test?

@xmudrii
Copy link
Contributor Author

xmudrii commented Jan 12, 2017

@mdlayher Added test, how does it looks?

Copy link
Contributor

@mdlayher mdlayher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I'd @nanzhong (and/or his teammates) to approve.

@nanzhong
Copy link
Member

lgtm! @grampajoe also gave it a 👍

@nanzhong nanzhong merged commit 0ed5a75 into digitalocean:master Jan 23, 2017
@xmudrii xmudrii deleted the patch-168 branch January 23, 2017 21:16
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

Successfully merging this pull request may close these issues.

pass ssh command line down to the actual ssh
3 participants