accessing a notebook on a remote machine

16 views
Skip to first unread message

Stan Schymanski

unread,
Oct 23, 2008, 10:38:24 AM10/23/08
to sage-support
Dear all,

I have been reading through many previous posts and getting snippets
of what has to be done in order to make a notebook accessible
remotely, but I can't draw a full picture. Is there a 'howto'
available anywhere that I could follow in order to setup a notebook on
a network computer and then access it from another machine on the same
network? I would like to cooperate with others at our institute on the
same notebook.

If there is no 'howto' yet, could someone talk me through it? I would
write a 'howto' myself if I get it to work.

Thanks already for any help I can get!

Cheers
Stan

Jason Grout

unread,
Oct 23, 2008, 10:45:52 AM10/23/08
to sage-s...@googlegroups.com


For starters, could you answer the following:

1. Are you using the vmware image, or do you have sage installed on your
computer directly?

2. Is your computer accessible from other computers (i.e., do you have a
computer name or IP address that you can access remotely)?

Jason

Stan Schymanski

unread,
Oct 23, 2008, 11:02:50 AM10/23/08
to sage-support
Hi Jason,

Thanks for the quick reply. Sorry I didn't provide any information.
I'm running sage 3.1.4 directly on a MacBook Pro under OS X 10.4.11,
and I do have a computer name that should be accessible from other
computers. I did activate the Remote Login in the System preferences,
but if I do "ssh username@ipaddress" or "ssh username@computername"
from another computer, the operation times out. Would this work if a
notebook server was running on the machine, or do I have to sort out
the right way to connect first?

Cheers,
Stan

Jason Grout

unread,
Oct 23, 2008, 11:11:02 AM10/23/08
to sage-s...@googlegroups.com
Stan Schymanski wrote:
> Hi Jason,
>
> Thanks for the quick reply. Sorry I didn't provide any information.
> I'm running sage 3.1.4 directly on a MacBook Pro under OS X 10.4.11,
> and I do have a computer name that should be accessible from other
> computers. I did activate the Remote Login in the System preferences,
> but if I do "ssh username@ipaddress" or "ssh username@computername"
> from another computer, the operation times out. Would this work if a
> notebook server was running on the machine, or do I have to sort out
> the right way to connect first?
>

Your comments about not being able to ssh into the computer seem to
indicate that you can't reach the computer. Can you ping it from
another computer?

ping ipaddress

or

ping computername

You're right, the network connectivity problem has to be taken care of
first before anything will work.

Thanks,

Jason

William Stein

unread,
Oct 23, 2008, 11:09:47 AM10/23/08
to sage-s...@googlegroups.com
On Thu, Oct 23, 2008 at 8:02 AM, Stan Schymanski <schy...@gmail.com> wrote:
>
> Hi Jason,
>
> Thanks for the quick reply. Sorry I didn't provide any information.
> I'm running sage 3.1.4 directly on a MacBook Pro under OS X 10.4.11,
> and I do have a computer name that should be accessible from other
> computers. I did activate the Remote Login in the System preferences,
> but if I do "ssh username@ipaddress" or "ssh username@computername"
> from another computer, the operation times out. Would this work if a
> notebook server was running on the machine, or do I have to sort out
> the right way to connect first?

Have you tried something like the following. Startup sage on your
macbook pro and type

sage: notebook(address="ipaddress",port=8100,secure=True)

then from another computer on your network try to visit the web page

https://ipaddress:8100

That's pretty much it, except for making accounts. To create accounts
you could temporarily do


sage: notebook(address="ipaddress",port=8100,secure=True, accounts=True)

let people make accounts, then do


sage: notebook(address="ipaddress",port=8100,secure=True,accounts=False)

so no new accounts can be created.

William

William Stein

unread,
Oct 23, 2008, 11:10:55 AM10/23/08
to sage-s...@googlegroups.com

If ping works then what I posted above might work. Ssh might not be
working for the original poster because he might have not started an
ssh daemon via the Sharing config stuff in OS X. It's not necessary to
have an ssh daemon in order to run a sage notebook server.

William

Stan Schymanski

unread,
Oct 23, 2008, 11:15:59 AM10/23/08
to sage-support
Hi Jason,

Thanks for the quick reply. Sorry I didn't provide any information.
I'm running sage 3.1.4 directly on a MacBook Pro under OS X 10.4.11,
and I do have a computer name that should be accessible from other
computers. I did activate the Remote Login in the System preferences,
but if I do "ssh username@ipaddress" or "ssh username@computername"
from another computer, the operation times out. Would this work if a
notebook server was running on the machine, or do I have to sort out
the right way to connect first?

Cheers,
Stan

On Oct 23, 4:45 pm, Jason Grout <jason-s...@creativetrax.com> wrote:

Stan Schymanski

unread,
Oct 23, 2008, 11:23:04 AM10/23/08
to sage-support
Thanks a lot for your advice! This sounds easy, indeed!
The network socket of the computer running sage is broken, so I can't
try it out. Ping did not work, that's how I found out about the
problem.
I will hopefully get it fixed tomorrow and report on the success.

All the best,
Stan

Stan Schymanski

unread,
Oct 24, 2008, 4:16:43 AM10/24/08
to sage-support
Dear William and Jason,

I got the network socket fixed by our support, went to http://www.whatismyip.com/
to find out my IP address, then followed William's instructions and
typed:

sage: notebook(address="ipaddress",port=8100,secure=True)

where ipaddress was replaced by the IP address of my computer. Then, I
was able to connect to the running notebook from another computer on
the network just by typing
https://ipaddress:8100 (again with ipaddress replaced by the IP
address of the computer running the notebook).

When I try to connect to this notebook in the same way from a computer
that is not on the same network, I get a network timeout, which
reassures me that the notebook is not going to be a gateway for
hackers around the world to create havoc on my computer. I will now
play around with adding users etc. as described in William's post
above.

Too easy! Thanks for your help!

All the best,
Stan

On Oct 23, 5:09 pm, "William Stein" <wst...@gmail.com> wrote:

Jason Grout

unread,
Oct 24, 2008, 7:15:14 AM10/24/08
to sage-s...@googlegroups.com
Stan Schymanski wrote:
> Dear William and Jason,
>
> I got the network socket fixed by our support, went to http://www.whatismyip.com/
> to find out my IP address, then followed William's instructions and
> typed:
>
> sage: notebook(address="ipaddress",port=8100,secure=True)
>
> where ipaddress was replaced by the IP address of my computer. Then, I
> was able to connect to the running notebook from another computer on
> the network just by typing
> https://ipaddress:8100 (again with ipaddress replaced by the IP
> address of the computer running the notebook).
>
> When I try to connect to this notebook in the same way from a computer
> that is not on the same network, I get a network timeout, which
> reassures me that the notebook is not going to be a gateway for
> hackers around the world to create havoc on my computer. I will now
> play around with adding users etc. as described in William's post
> above.
>
> Too easy! Thanks for your help!


You should also be able to do:

notebook(address="computername", port=8100, secure=True)

to be able to address it as just https://computername:8100.

That might work anyway even with address='ipaddress' too.

Jason

Stan Schymanski

unread,
Oct 24, 2008, 7:48:31 AM10/24/08
to sage-s...@googlegroups.com
Yes, confirmed. I now just use the computer name because it is a lot
easier to remember. :)

Is there an easy way to prevent someone from accidentally deleting data
on the computer? Just login from a restricted account before opening the
notebook, or do I have to set up a chroot jail?

Thanks!

Jason Grout

unread,
Oct 24, 2008, 8:06:10 AM10/24/08
to sage-s...@googlegroups.com
Stan Schymanski wrote:
> Yes, confirmed. I now just use the computer name because it is a lot
> easier to remember. :)
>
> Is there an easy way to prevent someone from accidentally deleting data
> on the computer? Just login from a restricted account before opening the
> notebook, or do I have to set up a chroot jail?
>


Whoever logs into the sage notebook will have access to a shell account
on the computer as the notebook user. So logging in as a restricted
account and then starting the notebook is a good idea. Chrooting is
also a good idea.

Jason

Reply all
Reply to author
Forward
0 new messages