I'm trying to work out how to ssh into a machine at work (it runs an RHEL-based distribution with OpenSSH 5.3). I have been given instructions on how to set up keys, permissions, etc., which have apparently worked in the past, and which I have followed to the letter, but am unable to get ssh to work (if it isn't obvious, I'm completely new to ssh).

The thing that's confusing me is that, from the machine itself, ssh localhost and ssh work perfectly, but ssh [url of machine] doesn't: -v gives the output

OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to <url> [::1] port 22.
debug1: Connection established.
debug1: identity file /home/<username>/.ssh/identity type -1
debug1: identity file /home/<username>/.ssh/id_rsa type -1
debug1: identity file /home/<username>/.ssh/id_dsa type 2
ssh_exchange_identification: Connection closed by remote host

which is the same output as I get when I try and log in remotely. I don't have admin access so I don't think I can get at any of the logs.

Does this give anyone any clues as to what the problem is, or is there any way I can get more details about the failure without root access?

EDIT: I can't get in to /etc/ssh/sshd_config, but /etc/ssh/ssh_config contains:

#   $OpenBSD: ssh_config,v 1.25 2009/02/17 01:28:32 djm Exp $

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

# Host *
#   ForwardAgent no
#   ForwardX11 no
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
Host *
    GSSAPIAuthentication yes
# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
    ForwardX11Trusted yes
# Send locale-related environment variables
  • 1
    /etc/ssh/ssh_config contains system wide defaults for connections to other hosts. (Well, when you find differences between that local config that doesn't work and one that works investigate those) However, what would be needed is the config file that sets up details on how to connect from other hosts. Go to your instructor and ask for an admin.
    – DerMike
    Jun 7 '12 at 14:17

Take a look at /etc/ssh/sshd_config. (If you can...)

There are the things configured that define the SSH Servers behavior like accepting connections and how to do authorization.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.