1

I tried to run my jar file on server with following command

java -Jar file.jar

I often get write fialed: broken pipe if my client computer go sleep and resume later.

I want to solve this problem based on this page. But, the ssh_configure file has read only permission and I cannot save the following line in it.

Host *
ServerAliveInterval 120

I want to know how can I change the context of this file.

1 Answers1

0

You can save this in the per user ssh client configuration file ~/.ssh/config. You need to create it if it does not exist already. Now add the following:

Host *
    ServerAliveInterval 120

Change the interval if you want but don't give a high value.

The global ssh client configuration file /etc/ssh/ssh_config has the following permission:

-rw-r--r-- 1 root root 1720 Jun  8 00:23 /etc/ssh/ssh_config

As you can see you need to be root to edit the file.

heemayl
  • 93,925