Bad syntax and fixing crash when SSH connection not open