Created method CheckSshConnection() to use in FileController