Ask Your Question
2

sage notebook server + ssh tunneling + port forwarding

asked 2011-11-03 18:01:41 +0100

Giovanni gravatar image

I have access to a remote server through a gate computer with this command:

ssh -fN -l user -L port:host:22 gate #To Bring up the tunnel

ssh -X -p port user@localhost #To open an X session to my server

Once on the server I run sage by typing "./sage" in the installation directory. Now the questions:

1)Which are the right commands to bring up the remote notebook server?

2)What should I type in my local browser? (I suppose something like 'localhost:port', but even without launching the notebook server I get the following error:'SSH-2.0-OpenSSH_4.3 Protocol mismatch')

I tried to read the instructions and the wiki, but I confess that I am at a loss.

Thanks a lot

Giovanni

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2011-11-04 09:01:59 +0100

Daniel Krenn gravatar image
  1. Connect via ssh to your server and bind port, e.g.

    ssh -L 8000:localhost:8000 user@your.server.com
    

    You can use some extra ssh-options if you want...

  2. Run

    ./sage -notebook
    

    on your server.

  3. Open a browser (locally) and type in

    http://localhost:8000
    

BTW: You do not need a X session to your server for that.

edit flag offensive delete link more

Comments

1

It worked! Thanks a lot!!! This way I can work on my University Cluster!

Giovanni gravatar imageGiovanni ( 2011-11-04 09:54:11 +0100 )edit

I find it useful to run the `./sage -notebook` command from inside a `screen`, so that when I close the SSH tunnel, the Sage server and the worksheets keep running.

Felix Lawrence gravatar imageFelix Lawrence ( 2011-11-09 06:01:59 +0100 )edit

You can also use `nohup` to keep the server running when closing the SSH tunnel.

Daniel Krenn gravatar imageDaniel Krenn ( 2011-11-09 11:24:51 +0100 )edit
0

answered 2011-11-04 03:03:07 +0100

Emil Widmann gravatar image

start sage with ./sage -notebook This will bring up the server on port 8000 Then try to connect with it from your local browser with host:8000

If you can get no connection you should check if any firewalls are up to block this port. In rare cases port 8000 is already in use then you could bring up another port with ./sage -notebook port=8080.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-11-03 18:01:41 +0100

Seen: 2,544 times

Last updated: Nov 04 '11