I'm announcing the first version of my ssh2 module, now available on
npm.
ssh2 aims to be a complete SSH2 client written in pure JavaScript that
implements the SSH2 protocol (it does not shell out to a command-line
ssh client).
Currently it can execute one-off commands and start interactive shell
sessions. There are still several things to be implemented and
tweaked, but I think it's at least in a fairly usable and stable state
now.
Feel free to give it a whirl and report any bugs you may come across.
> I'm announcing the first version of my ssh2 module, now available on
> npm.
> ssh2 aims to be a complete SSH2 client written in pure JavaScript that
> implements the SSH2 protocol (it does not shell out to a command-line
> ssh client).
> Currently it can execute one-off commands and start interactive shell
> sessions. There are still several things to be implemented and
> tweaked, but I think it's at least in a fairly usable and stable state
> now.
> Feel free to give it a whirl and report any bugs you may come across.
On Nov 11, 6:13 pm, Alex Kocharin <a...@kocharin.ru> wrote:
> What about the server part? I've seen plenty of ssh clients, but I couldn't find an appropriate node ssh server module, so that could be useful.
I'm not really interested in writing an SSH server. Also, the other
SSH clients that are out there currently merely spin up 'ssh' as a
child process which isn't very efficient or easy to work with. My ssh2
module implements the SSH 2.0 protocol itself, so there are no child
processes involved.
On Sun, Nov 11, 2012 at 3:59 PM, mscdex <msc...@gmail.com> wrote:
> On Nov 11, 6:13 pm, Alex Kocharin <a...@kocharin.ru> wrote:
>> What about the server part? I've seen plenty of ssh clients, but I couldn't find an appropriate node ssh server module, so that could be useful.
> I'm not really interested in writing an SSH server. Also, the other
> SSH clients that are out there currently merely spin up 'ssh' as a
> child process which isn't very efficient or easy to work with. My ssh2
> module implements the SSH 2.0 protocol itself, so there are no child
> processes involved.
On Sunday, November 11, 2012 6:00:19 PM UTC-5, mscdex wrote:
> Hello all!
> I'm announcing the first version of my ssh2 module, now available on > npm.
> ssh2 aims to be a complete SSH2 client written in pure JavaScript that > implements the SSH2 protocol (it does not shell out to a command-line > ssh client).
> Currently it can execute one-off commands and start interactive shell > sessions. There are still several things to be implemented and > tweaked, but I think it's at least in a fairly usable and stable state > now.
> Feel free to give it a whirl and report any bugs you may come across.
On Nov 11, 11:24 pm, dhruvbird <dhruvb...@gmail.com> wrote:
> Curious to know why you need both pub & priv key instead of just the
> priv-key.
Currently AFAIK there is no way to generate a public key from a
private key with the existing crypto API. With that in mind, I am
planning on eventually doing the required calculations myself, but
there are other items on the TODO that have a higher priority at the
moment.
Great work! I've been wanting something like this for a long time. One
quick question though. Is it possible to both spawn a child process and
use it's stdio as raw binary data (no tty metadata) *and* spawn a tty
powered child (like bash -l) in the same connection? I never could find a
way to do this with shelling out to ssh, but maybe by implementing the
protocol you have more flexibility is what can be done.
On Nov 15, 12:24 pm, Tim Caswell <t...@creationix.com> wrote:
> Great work! I've been wanting something like this for a long time. One
> quick question though. Is it possible to both spawn a child process and
> use it's stdio as raw binary data (no tty metadata) *and* spawn a tty
> powered child (like bash -l) in the same connection? I never could find a
> way to do this with shelling out to ssh, but maybe by implementing the
> protocol you have more flexibility is what can be done.
Yes, all of the functionality you see can be done within the same
connection to the server because SSH2 allows multiplexing. For
example, you could have 10 ptys open while executing 75 child
processes and forwarding connections to the server.
On Thu, Nov 15, 2012 at 12:24 PM, Tim Caswell <t...@creationix.com> wrote:
> Great work! I've been wanting something like this for a long time. One
> quick question though. Is it possible to both spawn a child process and
> use it's stdio as raw binary data (no tty metadata) *and* spawn a tty
> powered child (like bash -l) in the same connection? I never could find a
> way to do this with shelling out to ssh, but maybe by implementing the
> protocol you have more flexibility is what can be done.
> On Thu, Nov 15, 2012 at 8:25 AM, mscdex <msc...@gmail.com> wrote:
>> v0.0.2 is now out on npm and supports more functionality, including:
>> * port/connection forwarding in both directions
>> * sending local terminal window resize notifications to the server
v0.1.3 is now out on npm and includes support for ssh-agent
authentication, host fingerprint verification, and automatic
generation of the public key from a private key.
On Tue, Nov 27, 2012 at 3:48 PM, mscdex <msc...@gmail.com> wrote:
> v0.1.3 is now out on npm and includes support for ssh-agent
> authentication, host fingerprint verification, and automatic
> generation of the public key from a private key.
v0.1.8 is now out on npm. Highlights since v0.1.3:
* Various bug fixes
* SFTP has createReadStream and createWriteStream now
* Keepalive support
Also, I wrote a fairly simple little script that uses ssh2 to exec()
on multiple servers in parallel for those who may be interested:
https://gist.github.com/4279365. I've been using it myself to easily
perform one-off tasks like git pulls, updating node, etc.
> v0.1.8 is now out on npm. Highlights since v0.1.3:
> * Various bug fixes
> * SFTP has createReadStream and createWriteStream now
> * Keepalive support
> Also, I wrote a fairly simple little script that uses ssh2 to exec()
> on multiple servers in parallel for those who may be interested:
> https://gist.github.com/4279365. I've been using it myself to easily
> perform one-off tasks like git pulls, updating node, etc.
> thanks, and how to enable dynamic forward port like "ssh -D1080", can you
> give a demo ?
Dynamic port forwarding is not something that is supported by this
module. Basically what that requires is writing a SOCKS proxy
implementation -- something that's really outside the scope of this
project. Once you write that (there may be some SOCKS modules worth
looking at on npm), you can easily hook it up to this module and
initiate the outbound connections using forwardOut() and then piping
the data.
> On Dec 13, 10:35 pm, 马涛 <iwa...@gmail.com> wrote:
> > thanks, and how to enable dynamic forward port like "ssh -D1080", can you
> > give a demo ?
> Dynamic port forwarding is not something that is supported by this
> module. Basically what that requires is writing a SOCKS proxy
> implementation -- something that's really outside the scope of this
> project. Once you write that (there may be some SOCKS modules worth
> looking at on npm), you can easily hook it up to this module and
> initiate the outbound connections using forwardOut() and then piping
> the data.
On Sunday, November 11, 2012 6:00:19 PM UTC-5, mscdex wrote:
> Hello all!
> I'm announcing the first version of my ssh2 module, now available on > npm.
> ssh2 aims to be a complete SSH2 client written in pure JavaScript that > implements the SSH2 protocol (it does not shell out to a command-line > ssh client).
> Currently it can execute one-off commands and start interactive shell > sessions. There are still several things to be implemented and > tweaked, but I think it's at least in a fairly usable and stable state > now.
> Feel free to give it a whirl and report any bugs you may come across.
Once we switched sshd back to 22 instead of 443 then everything 'worked' as expected. The forwarded port was now available locally.
When using 443 there were no errors, but the forwarded port did not respond or show up in netstat. It could have been something in our network. sshd was running on ubuntu server. Once again switching to 22 seems to have resolved whatever the issue was.
On Tuesday, April 9, 2013 9:56:23 AM UTC-4, Mark Cantrell wrote:
> Once we switched sshd back to 22 instead of 443 then everything 'worked' > as expected. The forwarded port was now available locally.
> When using 443 there were no errors, but the forwarded port did not > respond or show up in netstat. It could have been something in our > network. sshd was running on ubuntu server. Once again switching to 22 > seems to have resolved whatever the issue was.
> Thanks! > Mark
> On Monday, March 4, 2013 2:03:00 PM UTC-5, mscdex wrote:
>> On Mar 4, 12:09 pm, Mark Cantrell <mark.e.cantr...@gmail.com> wrote: >> > c.forwardOut('localhost', 8089, 'skynetHost', 8080, >> function(err, >> > stream) {
>> Does it work if you use IP addresses instead of hostnames?
>> Also what do you mean by it doesn't work? Is an error thrown? Are >> certain callbacks not executed?
On Monday, November 12, 2012 12:00:19 AM UTC+1, mscdex wrote:
> Hello all!
> I'm announcing the first version of my ssh2 module, now available on > npm.
> ssh2 aims to be a complete SSH2 client written in pure JavaScript that > implements the SSH2 protocol (it does not shell out to a command-line > ssh client).
> Currently it can execute one-off commands and start interactive shell > sessions. There are still several things to be implemented and > tweaked, but I think it's at least in a fairly usable and stable state > now.
> Feel free to give it a whirl and report any bugs you may come across.