First time here? Check out the FAQ!

Ask Your Question
0

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

asked 10 years ago

alejandroerickson gravatar image

updated 10 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 10 years ago

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'\'''
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: 10 years ago

Seen: 562 times

Last updated: Dec 21 '14