I have a few servers on a LAN where I share out the /scratch folder on each via NFS-server,
and on each server using NFS-client I mount the other's scratch folders.
Problem arises when any one of the servers goes down, for example a reboot.
When an NFS-server is down, if cannot log in to any other system which is an NFS-client to that server.
- an SSH connection to the NFS-client system can be established successfully,
- you can enter your username and password,
- but after entering your password you never get a prompt and the SSH connection is frozen.
- After however long if the NFS-server system finally becomes available, you will get the prompt and be able to use that SSH connection.

How can I make it so that this does not happen?

there is this at stackexchange with further describes the problem in general, however there does not seem to be a solution:

my /etc/fstab file contains: hpc2:/scratch /scratch_hpc2 nfs defaults 0 0

the /etc/exports file on the nfs-server system contains: /scratch <ip_address>(rw,root_squash,sync,no_subtree_chec k)

I have set up NFS-server via YAST and I do NOT use NFSv4 nor do I use GSS security,

and /proc/mounts from an nfs-client system shows:

hpc2:/scratch /scratch_hpc2 nfs rw,relatime,vers=3,rsize=1048576,wsize=1048576,nam len=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys ,mountaddr=<ip_address>,mountvers=3,mountport=4055 1,mountproto=udp,local_lock=none,addr=<ip_address> 0 0