Fix send command if reconnection is needed when using SSH.