SSH connection getting closed automatically after a sudo command
0
I have two servers running the same version of RedHat 6.4, however one of them behaves differently when I run remote sudo commands through SSH on it. On server1, the connection is automatically closed after a successful sudo command, but on server3, the connection is kept open. Note that for these tests the sudo user had the NOPASSWD flag so no prompt is asked. As far as I know, all configurations on these servers are the same (they were cloned). I tested using this: ssh -vvv user@server1 << EOF sudo ls -l /home/ ls -l /home/ pwd EOF If I run this on server1 I get a single file listing. debug3: Wrote 32 bytes for a total of 1621 total 40 drwxr-xr-x. 5 user user 4096 Apr 26 2013 user debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug2: channel 0: rcvd e...