Giter Club home page Giter Club logo

gateone's Introduction

About Gate One

Gate One is an HTML5 web-based terminal emulator and SSH client. Top features:

  • No browser plugins required! Say goodbye to the security problems of Java, Flash, and ActiveX.
  • Multi-user and multi-terminal: Hundreds of simultaneous users and terminals can be served from ho-hum hardware.
  • Advanced terminal emulation including support for 256 colors, fancy text styles, and more.
  • Supports capturing and displaying images and PDFs inline within terminals (see screenshots).
  • Type in your native language! Gate One supports Unicode, international keyboard layouts, and localized strings (internationalization or i18n).
  • Natural copy & paste: Highlight text and use your browser's native context menu. On Macs you can use ⌘-c and ⌘-v and on Linux desktops you can middle-click-to-paste. Shift-Insert works too!
  • Terminal sessions can be resumed even if the browser is closed or disconnected. They can also be resumed from a completely different computer. You'll never have to worry about the office VPN disconnecting again!
  • Supports server-side logging of user sessions via any combination of syslog, remote syslog, or directly to disk.
  • Gate One can be embedded into any web application. A few lines of JavaScript is all it takes! There's an interactive tutorial covering how to embed available in the tests directory (hello_embedded).
  • Many authentication mechanisms are supported: Anonymous, Kerberos (Single Sign-On with Active Directory!), PAM, Google Auth, and there's an OpenID-like WebSocket API for applications embedding Gate One (see the chat app in the tests directory for an example of how it works).
  • Gate One is easy to customize: Themes and plugins can add features or override just about anything. In fact, Gate One's SSH functionality is implemented entirely via a plugin.
  • Plugins can be written in any combination of Python, JavaScript, and CSS.
  • The Gate One server can be stopped & started without users losing their running terminal applications (even SSH sessions stay connected!).
  • The SSH plugin allows users to duplicate sessions without having to re-enter their username and password (it re-uses the existing SSH tunnel). It also supports key-based authentication and includes an SSH identity manager that supports RSA, DSA, ECDSA, and even X.509 certificates.
  • The SSH plugin also provides a library of functions that other plugins can use to seamlessly execute background operations on the currently-connected terminal. You can capture this output from JavaScript and do whatever you want with it.
  • The Bookmarks plugin lets you keep track of all of your hosts with support for tagging, sorting, and includes a super fast search. It was built to handle thousands of bookmarks and can be used with whatever URLs you want--it isn't limited to SSH!
  • The Logging plugin includes a Log Viewer that allows users to sort, view, and even export recordings of their terminal sessions to self-contained HTML files that can be shared. Demonstrating anything on the command line can be as simple as performing the task and clicking a button!
  • The Playback plugin allows users to rewind and play back their connected terminal sessions in real-time, just like a video! This can be done via the playback controls or by holding the shift key while scrolling.
  • The Convenience plugin adds many convenient capabilities:
    • IPv4 and IPv6 addresses become clickable elements that can perform a reverse DNS lookup.
    • The output of 'ls -l' is transformed into clickable elements that can perform user and group lookups, convert bytes into human-readable strings, and even tell you what the 'chmod equivalent' is of the permissions field (e.g. clicking on 'crw-rw-rw-' would tell you, "(Character Device) with permissions equivalent to 'chmod 0666'").
    • Automatic syntax highlighting of syslog messages.
  • The Example plugin demonstrates how to write your own plugins and shows off the SSH plugin's exec_remote_command() functionality.
  • Gate One works with Python 2.6+, Python 3, and even pypy!
  • The daemon that acts as the web server for Gate One is small and light enough to be included in embedded devices.

License

Gate One is dual licensed: AGPLv3 or Commercial Licensing. More information can be found at http://liftoffsoftware.com/

Screenshots

http://i.imgur.com/fb32a.png

The Grid View showing multiple terminals

http://i.imgur.com/5P6wy.png

Displaying images inline in a terminal

http://i.imgur.com/zRLn3.png

A demonstration of some of the Convenience plugin's capabilities

http://i.imgur.com/97CYx.png

The Example plugin showing off the real-time load graph and the 'top' widget

Documentation

The documentation for Gate One can be found here: http://liftoff.github.com/GateOne/

Also, all (this) documentation is in the "gateone/docs" directory. The HTML form is pre-built and ready-to-read.

Demo

Just press the ESC key on any page at http://liftoffsoftware.com/ to have Gate One drop down into view, Quake-style!

Other Notable Bits

Gate One's termio and terminal Python modules can be used together to automate, screen-scrape, and completely control terminal applications. The expect() function can be used as a replacement for pexpect that has some additional features and benefits:

  • It can be used asynchronously: It won't block which means it is perfect for executing commands from a web application.
  • It supports sophisticated decision trees and callbacks: You can completely re-define all patterns and callbacks on-the-fly based on whatever conditions you want.

gateone's People

Contributors

adi3000 avatar berezhinskiy avatar bggolding avatar boboss74 avatar cbou avatar dinglx avatar dredkin avatar eroldan avatar gr0undzer0 avatar gwindalmir avatar haraldweber avatar jquast avatar kostast avatar liftoff avatar lipidity avatar lordbaco avatar mammo0 avatar moises-silva avatar noelkd avatar patsissons avatar shane-kerr avatar splack avatar tjfontaine avatar totakoko avatar vintitres avatar wcypierre avatar wrightrocket avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gateone's Issues

Midnight Commander doesn't work

I assume, that other curses-based applications have this issue as well:

Traceback (most recent call last):
File "/home/me/GateOne/gateone/termio.py", line 435, in proc_read
self.term_write(updated)
File "/home/me/GateOne/gateone/termio.py", line 350, in term_write
self.term.write(chars)
File "/home/met/GateOne/gateone/terminal.py", line 750, in write
csi_handlerscsi_type
TypeError: save_cursor_position() takes exactly 1 argument (2 given)

Work on Chromium, not on Firefox

[23:38:28,245] La connexion avec wss://0.0.0.0/ws a été interrompue pendant le chargement de la page. @ https://0.0.0.0/static/gateone.js:917
[23:38:28,309] 2011-10-14 23:38:28 ERROR Error communicating with server... @ https://0.0.0.0/static/logging/logging.js:58
[23:38:29,099] Could not get domain! @ https://0.0.0.0/static/gateone.js:2223
[23:38:30,530] 2011-10-14 23:38:30 INFO PONG: Gate One server round-trip latency: 4ms @ https://0.0.0.0/static/logging/logging.js:58

GateOne error - on Amazon EC2 Amazon Linux AMI

[I 111018 12:38:21 gateone:342] WebSocket opened (%anonymous)
[I 111018 12:38:26 gateone:868] MDI0YTljMjdmNGRkNDhhN2FmYWI4YWE5ZTI2YWQ4ZmZkY received quit()... Killing termio session.
[I 111018 12:39:28 gateone:374] WebSocket closed (%anonymous)

The brower opens upto 20 sessions quickly and all of them closed immediately.
Do you know y this happens?

Disconnect/reconnect looping error

Twice tonight with the latest code on Ubuntu 11.04/Python 2.7.1+ I got a few logins open and then saw the "communications disruption" message, along with a list of the open terminals in the lower right corner, and a cycle of the terminal reappearing, then the erorr, etc. This block of messages was logged each time the cycle repeated:

INFO:root:WebSocket opened (%anonymous).
ERROR:root:Uncaught exception in /ws
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py", line 170, in wrapper
return callback(_args, *_kwargs)
File "./gateone.py", line 365, in on_message
self.commandskey
File "./gateone.py", line 614, in kill_terminal
SESSIONS[self.session][term]['multiplex'].proc_kill()
File "/opt/gateone/termio.py", line 324, in proc_kill
except (IOError, OSError):
UnboundLocalError: local variable 'IOError' referenced before assignment
INFO:root:WebSocket closed (%anonymous).

I can't tell if this is related to a specific login but I don't think so. It may have to do with the number of sessions I have open, though it seemed to appear with both three and four open. I'm afraid that I can't interpret the errors at all, but if there's anything I can do to test, let me know. . .

Feature Request - Support Private key authentication

I couldn't determine if private key authentication is supported.
If not, it's definitely something that should be considered.

Perhaps one implementation method could be to store the key(s) in the user's directory. Not sure how secure that would be though.

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3

Dont know if there is something missing in my config, but trying to do a ls -l on my home i got this crash:

[I 111014 02:45:45 gateone:339] WebSocket opened (%anonymous)
[I 111014 02:45:45 web:1359] 304 GET /static/dejavusansmono-webfont.woff (127.0.0.1) 0.64ms
[file dpi]: (pid 6452): Got DpiBye.
[E 111014 02:57:34 termio:450] Got BIZARRO exception in proc_read (WTF?): UnicodeDecodeError('ascii', '\xc3', 0, 1, 'ordinal not in range(128)')
Traceback (most recent call last):
File "/opt/gateone/termio.py", line 435, in proc_read
self.term_write(updated)
File "/opt/gateone/termio.py", line 350, in term_write
self.term.write(chars)
File "/opt/gateone/terminal.py", line 781, in write
self.screen[self.cursorY][self.cursorX] = unicode(char)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
[I 111014 02:57:37 gateone:862] MTAxNWFlZmQzMzU3NGU2NWJhM2M1Y2FiYWU2NjJiNzNkN received quit()... Killing termio session.

Blank Screen on connect

When I first set up gateone it worked fine, however after a reboot I launched gateone again, and I now receive just a blank screen, I attempted to connect to multiple hosts, no luck, just a blank black screen. I appear to be able to save bookmarks, edit preferences, but can't get a command prompt any more. I even changed the port number, no luck.

I then deleted "/opt/gateone" and started over from scratch, no luck.

I launch gateone using this command:

"/opt/gateone: ./gateone.py &"

Here is my config file:

sso_service = "HTTP"
pam_service = "login"
syslog_facility = "daemon"
disable_ssl = False
session_logging = True
session_dir = "/tmp/gateone"
cookie_secret = "MWM2NDY3MmVmZjIxNDNkNDg4MTIwYmQ4OWE0NTUwMDI1Y"
syslog_session_logging = False
address = "0.0.0.0"
sshfp = False
port = 2033
user_dir = "/opt/gateone/users"
log_file_num_backups = 10
logging = "info"
dtach = True
certificate = "certificate.pem"
keyfile = "keyfile.pem"
log_to_stderr = False
log_file_max_size = 104857600
session_timeout = "5d"
command = "/opt/gateone/plugins/ssh/scripts/ssh_connect.py -S '/tmp/gateone/%SESSION%/%r@%h:%p' -a '-oUserKnownHostsFile=%USERDIR%/%USER%/known_hosts'"
embedded = False
debug = False
sso_realm = None
auth = None
log_file_prefix = "/var/log/gateone/webserver.log"
pam_realm = "deraj"

Logfile:

[I 111018 22:22:57 gateone:1198] Listening on https://0.0.0.0:2033/
[I 111018 22:22:57 gateone:915] No authentication method configure. All users will be %anonymous
[I 111018 22:22:57 gateone:949] Loaded plugins: bookmarks, help, logging, playback, ssh
[I 111018 22:22:59 web:1359] 200 GET / (192.168.1.103) 26.55ms
[I 111018 22:22:59 web:1359] 200 GET /static/gateone.css (192.168.1.103) 1.81ms
[I 111018 22:22:59 web:1359] 200 GET /static/help/help.js (192.168.1.103) 7.17ms
[I 111018 22:22:59 web:1359] 200 GET /static/gateone.js (192.168.1.103) 45.97ms
[I 111018 22:22:59 web:1359] 200 GET /static/bookmarks/bookmarks.js (192.168.1.103) 6.19ms
[I 111018 22:22:59 web:1359] 200 GET /static/logging/logging.js (192.168.1.103) 3.44ms
[I 111018 22:22:59 web:1359] 200 GET /static/playback/playback.js (192.168.1.103) 2.38ms
[I 111018 22:23:00 web:1359] 200 GET /static/ssh/ssh.js (192.168.1.103) 2.41ms
[I 111018 22:23:00 web:1359] 200 GET /favicon.ico (192.168.1.103) 1.15ms
[I 111018 22:23:00 web:1359] 200 GET /style?scheme=black&container=gateone&prefix=go_ (192.168.1.103) 33.42ms
[I 111018 22:23:00 web:1359] 200 GET /static/go_process.js (192.168.1.103) 1.51ms
[I 111018 22:23:00 web:1359] 200 GET /static/dejavusansmono-webfont.woff (192.168.1.103) 3.94ms
[I 111018 22:23:00 gateone:342] WebSocket opened (%anonymous)
[E 111018 22:23:02 termio:443] Got BIZARRO exception in proc_read (WTF?): AttributeError("GzipFile instance has no attribute 'exit'",)
[I 111018 22:23:06 gateone:868] NjhhZTQxYzc1Y2VjNGZmNWI4NmVjYjk0ODc0YjY5ODM0N received quit()... Killing termio session.

AGPL can't realistically apply to browser code

How about an MIT license?

What does AGPL even mean in the browser? If the code is jitted along with other code in Safari, does that mean running the client in Safari (or Opera, or Chrome-not-Chromium, or Firefox-not-Iceweasel) is against the license?

Am I allowed to use the client code in a commercial application without it infecting my entire application?

This is an absolutely amazing concept, but AGPL is closed source as far as I'm concerned - there are just too many legal issues for me to consider using it for anything other than research or concept demos.

As far as the python server goes, I don't care if that's AGPL or not - a reverse proxy through another application should mitigate legal issues well enough, but the browser / client code really needs a truly open source license.

P.S. I love free software, and I try to release as much as I can open source, but the freedom of being able to use free and proprietary code as the occasion calls is really important. Not everything can be all open source all the time.

set target on detected links

No target is set on a link when it's detected, so clicking on it will cause you to navigate away from the terminal

SSL routines error after install

Regardless of browser, I get the following error after installation. I am running on port 50000 with all the other server.conf values at default, and this is on FreeBSD.

[I 111018 19:55:09 gateone:1198] Listening on https://0.0.0.0:50000/
[I 111018 19:55:09 gateone:915] No authentication method configure. All users will be %anonymous
[I 111018 19:55:09 gateone:949] Loaded plugins: bookmarks, help, logging, playback, ssh
[W 111018 19:55:11 iostream:379] Read error on 9: [Errno 1] _ssl.c:1325: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
[E 111018 19:55:11 netutil:217] Error in connection callback
Traceback (most recent call last):
File "/usr/local/lib/python2.6/site-packages/tornado/netutil.py", line 215, in _handle_connection
self.handle_stream(stream, address)
File "/usr/local/lib/python2.6/site-packages/tornado/httpserver.py", line 144, in handle_stream
self.no_keep_alive, self.xheaders)
File "/usr/local/lib/python2.6/site-packages/tornado/httpserver.py", line 171, in init
self.stream.read_until(b("\r\n\r\n"), self._header_callback)
File "/usr/local/lib/python2.6/site-packages/tornado/iostream.py", line 161, in read_until
if self._read_to_buffer() == 0:
File "/usr/local/lib/python2.6/site-packages/tornado/iostream.py", line 375, in _read_to_buffer
chunk = self._read_from_socket()
File "/usr/local/lib/python2.6/site-packages/tornado/iostream.py", line 635, in _read_from_socket
chunk = self.socket.read(self.read_chunk_size)
File "/usr/local/lib/python2.6/ssl.py", line 136, in read
return self._sslobj.read(len)
SSLError: [Errno 1] _ssl.c:1325: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
[I 111018 19:55:14 gateone:1218] Caught KeyboardInterrupt. Killing sessions...

cannot run gateone.py

Running installation on Mac OSX 10.6, Python 2.6 seemed to complete without any errors. However when I run gateone.py I get the following errors:

/opt/gateone dave$ sudo ./gateone.py
Traceback (most recent call last):
File "./gateone.py", line 216, in
import termio
File "/opt/gateone/termio.py", line 92, in
from tornado import ioloop
ImportError: No module named tornado

Sometimes GateOne won't respond to keystrokes in browser

Once in a while, I get into this state where GateOne won't respond to any keystrokes.
It happens in both Chrome and FF 8.
In Firefox, immediately after the page loads a terminal tab (waiting for hostname), it opens another one (and waits for hostname).
I can't type anything.

Gentoo 2.6.37
Python 2.7.1
Tornado 2.1.1

Terminal Open then Close

When i connect ssl sessions open then close down the right hand side of the web page in firefox & chrome.
In ie 9 a blank page is displayed.

Installed on FC15 with default server.conf.

SSL doesn't work unless started from inside /opt/gateone directory

I get SSL errors if I start gateone from any directory other than /opt/gateone.
That means I have to execute:
cd /opt/gateone
./gateone.py

Otherwise SSL errors appear:

[E 111013 16:29:03 ioloop:316] Exception in I/O handler for fd 4
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/tornado/ioloop.py", line 309, in start
self._handlers[fd](fd, events)
File "/usr/lib/python2.7/site-packages/tornado/netutil.py", line 319, in accept_handler
callback(connection, address)
File "/usr/lib/python2.7/site-packages/tornado/netutil.py", line 199, in _handle_connection
**self.ssl_options)
File "/usr/lib/python2.7/ssl.py", line 344, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python2.7/ssl.py", line 119, in init
ciphers)
SSLError: [Errno 336265218] _ssl.c:347: error:140B0002:SSL routines:SSL_CTX_use_PrivateKey_file:system lib

This occurs with the default SSL certs.

OS: Gentoo 2.6.37
Tornado 2.1.1
Python 2.7.1

Glitches with parenthesis and brackets in Vim

Sometimes, characters get changed (visually, not in the backend).
It seems it has something to do with parenthesis matching plugin of Vim.
Here's a simple repro case:
$ vim
Type the following (not tested with direct pasting):

this is a test of ('parenthesis')

After typing the last parenthesis, the 'p' in parenthesis changes to ')'.
Also happens with brackets '[' and '{'.

If you happen to open a file with brackets, and arrow the cursor over them, the same effect happens.

I've noticed this and an odd refresh/update issue by simply editing small perl scripts.

local variable 'locale_str' referenced before assignment

ap:/opt/gateone$ sudo python gateone.py
Traceback (most recent call last):
File "gateone.py", line 219, in
import termio
File "/opt/gateone/termio.py", line 102, in
_ = get_translation()
File "/opt/gateone/utils.py", line 139, in get_translation
user_locale = locale.get(locale_str)
UnboundLocalError: local variable 'locale_str' referenced before assignment

Let me know if I can provide any further info. I'm on FreeBSD and had previously been able to run GateOne before cloning into the latest version.

Crashed when I launched vim

When I launched vim I got this on the backend and no vim output in my shell:

Traceback (most recent call last):
  File "/opt/gateone/termio.py", line 435, in proc_read
    self.callbacks[self.CALLBACK_UPDATE]()
  File "gateone.py", line 671, in refresh_screen
    self.session][term]['multiplex'].dumplines()
  File "/opt/gateone/termio.py", line 501, in dumplines
    scrollback, html = self.term.dump_html()
  File "/opt/gateone/terminal.py", line 1763, in dump_html
    results = map(self.__spanify_line, self.screen, self.renditions)
  File "/opt/gateone/terminal.py", line 1634, in __spanify_line
    if 'reset' in _class:
TypeError: argument of type 'NoneType' is not iterable

My .vimrc has 256 colors enabled, if that matters. Regular colors seem to work fine (my shell prompt, the output of ls).

Scroll bars don't let you scroll back buffer as expected

Scrollback buffer scroll bars don't work as one would expect (ie. Putty, Konsole).

Example using a log file that's sufficiently long:
cat /var/log/dmesg

If it's a fresh session, and that's the first command that's ran, it's seems to work fine, except you can't get to the start of the log (back to the original shell command at the beginning).

Execute the same command again.
Scroll upwards (using scroll bars or mouse wheel)
Notice now, the last command is immediately visible, instead of the log output.
Continue scrolling, and you'll notice the log will start to repeat.

What I would expect to see is a continuous log output, like what Putty would show.
Note, that my scrollback buffer is set to 500, and my log file is ~330 lines. So I would expect to be able to see the entire file in the browser window.

Perhaps I'm scrolling through the buffer wrong, but then why are there scrollbars (and how do I)?

Client: Chrome/Windows
Server: Gentoo 2.6.37
Python 2.7.1
Tornado 2.1.1

ControlPath too long

The program works great on servers that have short prompts. It works great on this server:

[concord@tux2 ~]$

When attempting to login on servers with a longer prompt like this one:

[email protected]:~ $

I get the "ControlPath too long" error

Here's an example login session:

[Press Shift-F1 for help]

Host/IP or SSH URL [localhost]: raphaeloffice.dyndns.org
Port [22]: 1022
User: administrator
Connecting to: ssh://[email protected]:1022

[email protected]'s password:
ControlPath too long
[Press Enter to close this terminal]

Issue parsing server.conf ('dtach' is required to be a str)

Running master on Ubuntu 11.10 i386 (Python 2.7, tornado 1.2.1)

lotyrin@ip-10-166-225-99:~/GateOne/gateone$ ./gateone.py
Traceback (most recent call last):
  File "./gateone.py", line 1212, in <module>
    main()
  File "./gateone.py", line 1085, in main
    tornado.options.parse_config_file(GATEONE_DIR + "/server.conf")
  File "/usr/lib/python2.7/dist-packages/tornado/options.py", line 144, in parse_config_file
    options[name].set(config[name])
  File "/usr/lib/python2.7/dist-packages/tornado/options.py", line 233, in set
    (self.name, self.type.__name__))
tornado.options.Error: Option 'dtach' is required to be a str

Read through tornado sources, not sure why dtach option is a str when it's getting to this point.

Extended keys don't work right with Vim

The extended keys, such as the arrow keys and numeric keypad don't behave properly in Vim.
At the command-line, they work fine.

These options correspond to "application cursor keys mode" and "application keypad mode" in Putty (Terminal->Features).
This happens in Chrome and Firefox (at least).

My putty configuration that works is as follows:
[_] Disable application cursor mode (unchecked)
[X] Disable application keypad mode (checked)

Not sure if related, but the +/= key on number row only sends the + character in Firefox (Chrome is fine).

OS: Gentoo 2.6.37
Tornado: 2.1.1
Python: 2.7.1
OpenSSL: 1.0.0e

irssi issues

There are really only a couple issues I have at the moment

When running irssi PageUp will only redraw the upper portion of the window (the new content), I am presuming that ncurses is issuing a command to shift the existing lines for that window down and then drawing the new content. PageDown seems to work as expected.

I'm unable to change windows using the key shortcuts, alt- usually alt-1, alt-2 etc etc. In other emulators you have to specify "alt as meta". This may be related to the fact that I'm using OS X

(there were some drawing artifacts before but your fixes for mc applied here as well)

(Lion and Firefox 6.0.2)

Session Crashes with colored output

When logging into another machine behind the gateone host, color-escapes seem to break the ssh session. Gateone is running under the user "gateone".

Webserver-UI:

  Host/IP or SSH URL [localhost]: fuerkrebs                                                                                         
  Port [22]:                                                                                                                        
  User: krebs                                                                                                                       
  Connecting to: ssh://krebs@fuerkrebs:22                                                                                           
                                                                                                             
  Could not create directory '/home/gateone/.ssh'.                                                                                  
  krebs@fuerkrebs's password:                                                                                                       
  Linux fuerkrebs 2.6.32-5-486 #1 Sat Jun 11 19:49:29 UTC 2011 i686                                                                 
  KREBS PAINLOAD (MORE COBRA)                                                                                                       
    x x              x x                                                                                                            
   xx xx  xx    xx  xx xx                                                                                                           
   xx xx  xx    xx  xx xx                                                                                                           
    xxx    x     x   xxx                                                                                                            
     x  xxxxxxxxxxxx  x                                                                                                             
      xxxxxxxxxxxxxxxx                                                                                                              
     x  xxxxxxxxxxxx  x                                                                                                             
    x  x   x     x  x  x                                                                                                            
    x  x   x     x  x  x                                                
  --                                                                                                                                
  fuerkrebs /krebs ls --color                                                                                                       
                [[[ Shell crashes here]]

The krebs logo - normally in a red color escape sequence only has the first line printed correctly (reference file: curl https://raw.github.com/krebscode/painload/12c77cdbfa4ec48d935af3ae7cf1118e38bec6e1/infest/skel/etc/motd.tailas this is an older dev-machine it has not yet been updated to https://raw.github.com/krebscode/painload/master/infest/skel/etc/motd.tail )

Webserver.log

[I 111014 18:34:31 gateone:339] WebSocket opened (%anonymous)
[E 111014 18:36:10 termio:450] Got BIZARRO exception in proc_read (WTF?): UnicodeDecodeError('ascii', '\xc3', 0, 1, 'ordinal not in range(128)')
[I 111014 18:36:12 gateone:865] ZmFmOGZkMGU1NWY5NGIwMjgyMmY1ZTNhMGVjNWE4MTcyM received quit()...  Killing termio session.

The Traceback:

Traceback (most recent call last):
  File "/opt/gateone/termio.py", line 431, in proc_read
    self.term_write(updated)
  File "/opt/gateone/termio.py", line 350, in term_write
    self.term.write(chars)
  File "/opt/gateone/terminal.py", line 783, in write
    self.screen[self.cursorY][self.cursorX] = unicode(char)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)

GateOne will not start

OS: Ubuntu 10.11 server x64

As far as I can tell, I have all the dependencies including dtach.

execute command:
sudo ./gateone.py --disable_ssl=True

output:

Traceback (most recent call last):
File "./gateone.py", line 1203, in
main()
File "./gateone.py", line 1081, in main
tornado.options.parse_config_file(GATEONE_DIR + "/server.conf")
File "/usr/lib/python2.7/dist-packages/tornado/options.py", line 144, in parse_config_file
options[name].set(config[name])
File "/usr/lib/python2.7/dist-packages/tornado/options.py", line 233, in set
(self.name, self.type.name))
tornado.options.Error: Option 'dtach' is required to be a str

Recording playback broken

When wanting to play back a recording, webserver says:

400: Bad Request

Log says:

[W 111027 14:27:20 web:989] 400 POST /recording (XXX.XXX.XXX.XXX): Missing argument theme

GateOne just scrolls that terminals are closed and doesn't load

I wasn't really sure how to describe this so I shot a quick video of what it's doing:
http://www.youtube.com/watch?v=VLHaIZc-bfM

I don't see anything odd in the webserver log:
[I 111014 13:35:08 web:1359] 200 GET / (10.37.58.122) 6.09ms
[I 111014 13:35:09 web:1359] 304 GET /static/gateone.css (10.37.58.122) 1.47ms
[I 111014 13:35:09 web:1359] 304 GET /static/help/help.js (10.37.58.122) 1.13ms
[I 111014 13:35:09 web:1359] 200 GET /static/gateone.js (10.37.58.122) 20.68ms
[I 111014 13:35:09 web:1359] 304 GET /static/bookmarks/bookmarks.js (10.37.58.122) 0.76ms
[I 111014 13:35:09 gateone:371] WebSocket closed (%anonymous)
[I 111014 13:35:09 web:1359] 304 GET /static/logging/logging.js (10.37.58.122) 1.13ms
[I 111014 13:35:09 web:1359] 304 GET /static/playback/playback.js (10.37.58.122) 1.11ms
[I 111014 13:35:09 web:1359] 304 GET /static/ssh/ssh.js (10.37.58.122) 1.13ms
[I 111014 13:35:09 web:1359] 200 GET /favicon.ico (10.37.58.122) 1.35ms
[I 111014 13:35:09 web:1359] 304 GET /style?scheme=black&container=gateone&prefix=go_ (10.37.58.122) 26.80ms
[I 111014 13:35:09 web:1359] 200 GET /static/go_process.js (10.37.58.122) 1.35ms
[I 111014 13:35:10 web:1359] 304 GET /static/dejavusansmono-webfont.woff (10.37.58.122) 1.07ms
[I 111014 13:35:10 gateone:339] WebSocket opened (%anonymous)
[I 111014 13:35:15 gateone:865] YmRmMTY3YTE5NjIyNDVkMmJhOGFhMTcxMGZlNDQwZDUzZ received quit()... Killing termio session.
[I 111014 13:35:23 gateone:371] WebSocket closed (%anonymous)
[I 111014 13:35:52 gateone:1200] Caught KeyboardInterrupt. Killing sessions...

I'm running it in with debug=true on port 4433 as root also but there is no output on the command line as to any errors. I'm running Fedora 15 if that makes a difference. Where else can I look?

Auth = None acting strange

I'm trying to install gateone on an embedded device and I'm running into some trouble with auth = none:

ÄI 000101 06:17:26 auth:92Ü Creating user directory: /tmp//%anonymous
ÄI 000101 06:17:26 web:1359Ü 302 GET /auth?next=%2F (172.20.0.96) 19.30ms
ÄI 000101 06:17:26 web:1359Ü 302 GET / (172.20.0.96) 4.40ms
ÄI 000101 06:17:26 auth:92Ü Creating user directory: /tmp//%anonymous
ÄI 000101 06:17:26 web:1359Ü 302 GET /auth?next=%2F (172.20.0.96) 15.93ms
ÄI 000101 06:17:26 web:1359Ü 302 GET / (172.20.0.96) 4.48ms
ÄI 000101 06:17:26 auth:92Ü Creating user directory: /tmp//%anonymous
ÄI 000101 06:17:26 web:1359Ü 302 GET /auth?next=%2F (172.20.0.96) 16.02ms
ÄI 000101 06:17:26 web:1359Ü 302 GET / (172.20.0.96) 4.28ms

Auth = google gives redirects me to google and then gives me a 500 with this in the log:

ÄI 000101 06:19:44 web:1359Ü 302 GET / (172.20.0.96) 10.72ms
ÄI 000101 06:19:44 web:1359Ü 302 GET /auth?next=%2F (172.20.0.96) 9.24ms
ÄW 000101 06:19:45 iostream:599Ü SSL Error on 10: ÄErrno 1Ü _ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
ÄW 000101 06:19:45 auth:150Ü Invalid OpenID response: HTTP 599: Connection closed

python 2.7.2, latest tornado from git, pyopenssl 0.13

MimeTypeFail: Could not guess mime type of /[...]/bell.ogg

Hello

I'm trying to run gateone on FreeBSD, Python 2.7.2.
When visited by a browser, gateone gives the following error in the logfile:

  File "/usr/local/lib/python2.7/site-packages/tornado-1.2.1-py2.7.egg/tornado/web.py", line 861, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/tornado-1.2.1-py2.7.egg/tornado/web.py", line 1497, in wrapper
    return method(self, *args, **kwargs)
  File "gateone.py", line 284, in get
    bell_data_uri = create_data_uri(bell)
  File "/srv/gateone/utils.py", line 529, in create_data_uri
    raise MimeTypeFail("Could not guess mime type of: %s" % filepath)
MimeTypeFail: Could not guess mime type of: /srv/gateone/static/bell.ogg

Google authentication error: cannot concatenate 'str' and 'dict' objects

When using "google" for authentication, I can successfully login using my Google account, however when google passes that information back to GateOne, the server fails with a 500 error.

An error log excerpt shows this:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/tornado/web.py", line 897, in wrapper
return callback(_args, *_kwargs)
File "/usr/lib/python2.7/site-packages/tornado/auth.py", line 196, in _on_authentication_verified
callback(user)
File "/opt/gateone/auth.py", line 172, in _on_auth
self.user_login(user) # This takes care of the user's settings dir
File "/opt/gateone/auth.py", line 88, in user_login
user_dir = self.settings['user_dir'] + "/" + user
TypeError: cannot concatenate 'str' and 'dict' objects

I don't know if it matters, but I have 2-step authentication turned on.

OS: Gentoo 2.6.37
Tornado 2.1.1
Python 2.7.1

Cannot create bookmarks, clicking submit does nothing

I'm trying to create a bookmark for a session.
I fill in the first two fields (location & title). However when I click "Submit" nothing happens and no bookmark is stored.

Nothing shows in the logs:
phoenix daniel # /opt/gateone/gateone.py --log_to_stderr --logging=info --debug
[I 111014 14:30:20 gateone:1186] Listening on https://0.0.0.0:444/
[I 111014 14:30:20 gateone:907] Using google authentication
[I 111014 14:30:20 gateone:950] Loaded plugins: bookmarks, help, logging, playback, ssh
[I 111014 14:30:20 gateone:340] WebSocket opened ([email protected])

Feature Request - Support clipboard pasting

Pretty self-explanatory. :)

I don't know of a way to paste clipboard data, yet I believe this is extremely useful.

I'm not partial to how it's implemented:

  1. Right-click open (depends on browser support)
  2. Keyboard shortcut (eg. Ctrl-V, Shift-Ins), depends on terminal handling
  3. A button on the side-bar to paste (I could probably write this myself)

How to set site defaults?

So far I was editing static/gateone.js to adjust my site defaults to the white color scheme and a larger font size (120%).

Can I put this into another file which is not part of the GateOne distro so that it will not be overwritten by every update?

Feature request - SSHFP support

Don't know if this is the right way to send a feature request, it seemed more logical than attaching a comment to the screencast video ;) I'd like to suggest the addition of support for SSHFP records (RFC 4255). I know that they aren't used very often, and that they ought to be paired with DNSSEC for maximum security, but even without DNSSEC the presence of an SSHFP record would, IMO, increase the difficulty of an MITM attack against a Gate One connection.

Ultimately, having the SSL cert covered by a DANE TLSA record and the SSH fingerprint in an SSHFP record, with both of them signed and the DNSSEC validation taking place in a trusted way would be ideal; we're a ways off from achieving that, though.

Gateone opens/closes up to 84? New terminals - no CLI

Installed gateone on centos 5.7 server (rackspace). I installed python 2.7 parallel into /opt/python2.7 and left the Centos default python 2.4 in /usr/bin...

gateone starts fine:

cd /opt/gateone; python2.7 gateone.py
[I 111028 23:28:16 gateone:1572] Listening on https://0.0.0.0:443/
[I 111028 23:28:16 gateone:1253] Using google authentication
[I 111028 23:28:16 gateone:1288] Loaded plugins: bookmarks, help, logging, playback, ssh
[I 111028 23:28:21 gateone:685] WebSocket opened ([email protected]).

when i connect to the web interface (firefox 7.0.1) i immediately see scrolling up from the bottom right:

Closed term 1:Gate One
Closed term 2:Gate One
etc.

up to Closed term 30:Gate One

Sometimes it will go up to 41 this latest time it went up to 86.

on stdout I see:
[I 111028 23:31:40 web:1359] 304 GET / (2.2.2.2) 11.32ms
[I 111028 23:31:40 web:1359] 304 GET /static/gateone.css (2.2.2.2) 1.10ms
[I 111028 23:31:40 web:1359] 304 GET /static/gateone.js (2.2.2.2) 0.70ms
[I 111028 23:31:41 web:1359] 304 GET /static/help/help.js (2.2.2.2) 0.72ms
[I 111028 23:31:41 web:1359] 304 GET /static/bookmarks/bookmarks.js (2.2.2.2) 0.73ms
[I 111028 23:31:41 web:1359] 304 GET /static/logging/logging.js (2.2.2.2) 0.87ms
[I 111028 23:31:41 web:1359] 304 GET /static/playback/playback.js (2.2.2.2) 0.87ms
[I 111028 23:31:41 web:1359] 304 GET /static/ssh/ssh.js (2.2.2.2) 0.70ms
[I 111028 23:31:42 web:1359] 304 GET /style?theme=black&container=gateone&prefix=go_ (2.2.2.2) 28.79ms
[I 111028 23:31:42 web:1359] 304 GET /style?colors=default&container=gateone&prefix=go_ (2.2.2.2) 15.37ms
[I 111028 23:31:42 gateone:685] WebSocket opened ([email protected]).
[I 111028 23:32:06 gateone:1208] ZjkzOWZmNWJlNmE1UGN1NTg2NjIxYjUwNmY1YmE3N2RjO received quit()... Killing termio session.

At one point i did see an exception on stdout:

[E 111028 23:29:47 ioloop:319] Exception in I/O handler for fd 84
Traceback (most recent call last):
File "/opt/python2.7.2/lib/python2.7/site-packages/tornado/ioloop.py", line 309, in start
self._handlers[fd](fd, events)
File "/opt/gateone/termio.py", line 456, in proc_read
self.callbacksself.CALLBACK_EXIT
File "gateone.py", line 940, in new_terminal
self.refresh_screen(term) # Send a fresh screen to the client
File "gateone.py", line 1026, in refresh_screen
multiplexer = SESSIONS[self.session][term]['multiplex']
KeyError: u'ZjkzOWZmNWJlNmE1UGN1NTg2NjIxYjUwNmY1YmE3N2RjO'

Here is the server.conf:

sso_service = "HTTP"
locale = "en_US"
pam_service = "login"
syslog_facility = "daemon"
disable_ssl = False
session_logging = True
session_dir = "/tmp/gateone"
cookie_secret = "YjllM2VlYjYwZWQ1NDExMzgzIWN0NDZmODNjNjEzN2Q0M"
syslog_session_logging = True
address = "0.0.0.0"
port = 443
user_dir = "/opt/gateone/users"
log_file_num_backups = 10
logging = "info"
dtach = True
certificate = "certificate.pem"
keyfile = "keyfile.pem"
sso_realm = None
log_to_stderr = False
log_file_max_size = 104857600
session_timeout = "5d"
command = "/opt/gateone/plugins/ssh/scripts/ssh_connect.py -S '/tmp/gateone/%SESSION%/%SHORT_SOCKET%' --sshfp -a '-oUserKnownHostsFile=%USERDIR%/%USER%/known_hosts'"
embedded = False
debug = True
js_init = ""
auth = "google"
log_file_prefix = "/var/log/gateone/webserver.log"
pam_realm = "user"

Feature Request - X Forwarding

I'm requesting the ability to forward X connections.
It would be a bonus if another browser tab/window could be opened as an X server.
However I have Xming, so at least going to that is fine.

Ideally, any port forwarding would work.

missing requirement in docs: dtach

When trying out gateone, i got this:

/bin/sh: dtach: command not found
^LError in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib64/python2.6/atexit.py", line 24, in _run_exitfuncs
func(_targs, *_kargs)
File "/usr/lib64/python2.6/logging/init.py", line 1517, in shutdown
h.close()
File "/usr/lib64/python2.6/logging/init.py", line 836, in close
self.stream.close()
IOError: [Errno 9] Bad file descriptor
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib64/python2.6/atexit.py", line 24, in _run_exitfuncs
func(_targs, *_kargs)
File "/usr/lib64/python2.6/logging/init.py", line 1517, in shutdown
h.close()
File "/usr/lib64/python2.6/logging/init.py", line 836, in close
self.stream.close()
IOError: [Errno 9] Bad file descriptor
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor

After some search i found that i dont have dtach installed, but looking to the docs i dont see any reference to dtach... other than a way to disable it :)

so maybe its better to add the requirements list a optional dependency for dtach and a note to disable it if not installed

QuickStart?

Is there a quickstart somewhere?

I have installed, but I have no idea what the minimum command is to get things started; my install errors out -- unable to find /var/log/gateone/webserver.log.

Got BIZARRO exception in proc_read (WTF?): IndexError('list index out of range',)

I got the following traceback while resizing the window, it wasn't the easiest to reproduce my test case my remote shell I was inside screen and inside irssi, I think it was a combination of irssi ncurses drawing at the same time as the resize was propagating.

[E 111025 10:44:36 termio:481] proc_write() exception: must be unicode, not str
[E 111025 10:44:36 termio:481] proc_write() exception: must be unicode, not str
[E 111025 10:44:36 termio:448] Got BIZARRO exception in proc_read (WTF?): IndexError('list index out of range',)
Traceback (most recent call last):
File "/Users/tjfontaine/Development/GateOne/gateone/termio.py", line 431, in proc_read
self.term_write(updated)
File "/Users/tjfontaine/Development/GateOne/gateone/termio.py", line 371, in term_write
self.term.write(chars)
File "/Users/tjfontaine/Development/GateOne/gateone/terminal.py", line 845, in write
self.cursorX] = self.last_rendition
IndexError: list index out of range
[I 111025 10:44:42 gateone:1228] MDYy received quit()... Killing termio session.

Document known software requirements

Sorry if this isn't appropriate, but I wanted to document the known requirements in one place, based on what's been reported so far.

Required:
Python >= 2.6 (2.7 recommended)
Python needs to be built with SSL support if using OpenSSL
Tornado >= 2.1
OpenSSL
pyOpenSSL 0.12
NOTE:
pyOpenSSL 0.12 work with all versions of OpenSSL
pyOpenSSL 0.13 however, requires OpenSSL >= 0.9.8f

Optional:
python kerberos
dtach 0.8 (not sure if version matters, but 0.8 works)
(technically, OpenSSL is optional IIRC, but why?)

Client Requirements:
Browser supporting WebSockets:
Chrome/Chromium
Firefox 6.0.1+

Opera and IE are known NOT working.

Did I miss anything?

RHEL 5, GateOne errors

Initial impressions, after the install (command line, from GIT source)... the code errors:

python /opt/gateone/gateone.py

File "/opt/gateone/gateone.py", line 607
except KeyError as e:
^
SyntaxError: invalid syntax

It's catching a trap error, though I'm not clear yet as to what/why. This is a basic system, RHEL 5, installed right from the source. The docs indicate that running this will create a server configuration which is needed.

The docs also don't really address how you connect this to your web server for access (some people probably need that spelled out, or they'll ask).

Refresh speed on switching tabs

Hiya,

Dont know if this is possible, but when switching terminals there is a bit of a lag from switch to when you can actually do something. It would be nice if this could be minimised.

Cheers

Mark

Underscore is a dash

Ubuntu 11.04
Firefox 7.0.1
Standard US Keyboard

Using the shift key and the dash (-) key should create an underscore (_) but it does not. Also, I think the =/+ combination doesn't work at all. Bash's tab completion is fine for navigating around but the underscore doesn't work in the shell or vi either.

"dead keys" not working properly in firefox

If on the command line, I enter characters produced by "dead keys" they are (sometimes) not displayed in the right place, sometimes not displayed at all.

If i enter the chars right after logging in for example, this happens:
http://s7.postimage.org/c0mgejubt/Screenshot.png

After executing various commands producing lots of output and then hitting Ctrl-L to clear the screen, it looks like this:
http://s4.postimage.org/mjx8rih63/Screenshot_1.png
I.e. those character I typed at the beginning stay on top, but I can now not enter dead key characters any more... ??? Weired.

Firebug revealing the location in the dom: http://s7.postimage.org/awp0gqmh5/Screenshot_2.png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.