Ask Your Question
2

sage notebook server + ssh tunneling + port forwarding

asked 13 years ago

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

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
3

answered 13 years ago

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.

Preview: (hide)
link

Comments

1

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

Giovanni gravatar imageGiovanni ( 13 years ago )

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 ( 13 years ago )

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

Daniel Krenn gravatar imageDaniel Krenn ( 13 years ago )
0

answered 13 years ago

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.

Preview: (hide)
link

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: 13 years ago

Seen: 2,680 times

Last updated: Nov 04 '11