Ask Your Question
0

running sage as an argument to ssh command causes interpreter shell to hang

asked 2014-12-21 21:11:10 +0200

alejandroerickson gravatar image

updated 2014-12-21 21:12:06 +0200

I have sage on a remote server, and I can ssh to that server and then run sage to get the interpreter. But when I run sage from the ssh command, sage hangs before I get the sage: command prompt. Like this:

$ ssh user@host sage
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.1.1, Release Date: 2014-02-04                       │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘

I do not have admin rights on the server.

Ultimately, what I want to do is run the command

$ssh -t user@host1 '
screen -mS sage ssh host2 sh -c '\''cd /path/to/working/directory;sage'\'''

If you must know, it's because only host2 has sage and only host1 has screen. I have an unreliable connection to both, but they have a reliable connection between them.

The question: How can I get this to work?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2014-12-21 21:50:54 +0200

alejandroerickson gravatar image

Looks like I forgot the -t flag to the second ssh. It works with

$ssh -t user@host1 '
screen -mS sage ssh -t host2 sh -c '\''cd /path/to/working/directory;sage'\'''
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: 2014-12-21 21:11:10 +0200

Seen: 480 times

Last updated: Dec 21 '14