Poma
Poma

Reputation: 8484

Is there any javascript ssh client?

I mean pure javascript client that uses HTML5 sockets and doesn't need to be installed, just open single js file in browser. Is it possible to write such client at all?

Upvotes: 0

Views: 2797

Answers (2)

bobince
bobince

Reputation: 536665

You couldn't do it directly with Web Sockets, as they're (very deliberately) not a general raw socket capability. You would have to have a server-side proxy to forward keystrokes to the target ssh server.

Existing JS SSH implementations (WebShell, AnyTerm) are using XMLHttpRequest to transport data from the client to the proxy server. You could in theory improve their responsiveness by altering them to use WebSocket instead where available, but it's not really widespread yet. Given the number of incompatible changes that have already happened to the specification over its life, many are likely to be waiting for the ‘final’ version.

Upvotes: 1

Jani Hartikainen
Jani Hartikainen

Reputation: 43253

No.

JavaScript in the browser does not have raw TCP/IP socket support.

It would be possible to create an ssh client using some server-side technology to proxy the connection, and then do the client using JS. But of course for this you would require a server (like node or whatever)

Upvotes: 3

Related Questions