4

This is a follow up question for this question.

I took the advise by @Chris Lear by using screen commend. It works great, for short time sign out. But i met the following question several times.

After I log out, by ctrl+a, ctrl+d, and go to sleep, and try to resume on next morning, I am keep getting the following error message and the matlab progress on server is dead.

The error message is: packet_write_wait: connection to 128.2.xx.xxx: Broken pipe.

any ideas on how to fix this?

Thank you!

Community
  • 1
  • 1
JumpJump
  • 179
  • 10

2 Answers2

3

Run the screen on the server (as opposed to on the client, which is what you seem to be doing right now). This way, MATLAB can write output even if you are not connected to the server via ssh. The order of commands for this is ssh, screen, matlab. If you want to resume your session, just connect to the server via ssh, then run something like screen -x

Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35
0

Open /etc/ssh/ssh_config on your (client) computer. Add the following line:

ServerAliveInterval 100
ServerAliveCountMax 3  (default)

You can also set these values at the per-user level in ~/.ssh/config

Just remember this -- if you leave your ssh session open accidentally, anyone else with access to your desktop can get on it. Remember to close your session when finished.

David C. Rankin
  • 81,885
  • 6
  • 58
  • 85
  • My terminal says: Permission denied... – JumpJump Oct 19 '15 at 02:45
  • 1
    As long as you are using `openSSH` it shouldn't matter if you are on a mac or PC. You will need root access to set the system-wide default `/etc/ssh/ssh_config` values, use `~/.ssh/config` for yourself only. (if that is where your per-user `.ssh` dir is stored on the mac, otherwise set them where that may be.) – David C. Rankin Oct 19 '15 at 02:47