Results 1 to 4 of 4

Thread: Unable to connect to server with SSH using Ubuntu

  1. #1
    Join Date
    Feb 2013
    Beans
    1

    Unable to connect to server with SSH using Ubuntu

    I am having trouble logging into a server with SSH. I have pasted a log of events below. Please can someone help me trouble shoot the problem. It appears that I am making some connection from the events log file.

    ssh -vT ubuntu@ec2-176-34-121-133.eu-west-1.....amazonaws.com

    OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Connecting to ec2-176-34-121-133.eu-west-1.compute.amazonaws.com [176.34.121.133] port 22.
    debug1: Connection established.
    debug1: identity file /home/bosra/.ssh/id_rsa type 1
    debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
    debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
    debug1: identity file /home/bosra/.ssh/id_rsa-cert type -1
    debug1: identity file /home/bosra/.ssh/id_dsa type -1
    debug1: identity file /home/bosra/.ssh/id_dsa-cert type -1
    debug1: identity file /home/bosra/.ssh/id_ecdsa type -1
    debug1: identity file /home/bosra/.ssh/id_ecdsa-cert type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-3ubuntu1
    debug1: match: OpenSSH_6.0p1 Debian-3ubuntu1 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-3ubuntu1
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-ctr hmac-md5 none
    debug1: kex: client->server aes128-ctr hmac-md5 none
    debug1: sending SSH2_MSG_KEX_ECDH_INIT
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug1: Server host key: ECDSA 59:c4:29:87:87:50:f7:eb:fb:ea:2a:39:8b:07:1a:33
    debug1: Host 'ec2-176-34-121-133.eu-west-1.compute.amazonaws.com' is known and matches the ECDSA host key.
    debug1: Found key in /home/bosra/.ssh/known_hosts:3
    debug1: ssh_ecdsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: Roaming not allowed by server
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey
    debug1: Next authentication method: publickey
    debug1: Offering RSA public key: /home/bosra/.ssh/id_rsa
    debug1: Server accepts key: pkalg ssh-rsa blen 279
    debug1: Authentications that can continue: publickey
    debug1: Trying private key: /home/bosra/.ssh/id_dsa
    debug1: Trying private key: /home/bosra/.ssh/id_ecdsa
    debug1: No more authentication methods to try.
    Permission denied (publickey).

  2. #2
    Join Date
    Jun 2006
    Location
    Brisbane Australia
    Beans
    713

    Re: Unable to connect to server with SSH using Ubuntu

    Also look at /var/log/auth.log on the server for sshd messages.

    Permission errors on the server side are common. Ensure your home dir is mode 755 and ~/.ssh is 700.

  3. #3
    Join Date
    Jun 2006
    Location
    Brisbane Australia
    Beans
    713

    Re: Unable to connect to server with SSH using Ubuntu

    Oh yeah, and thanks for my help ...

  4. #4
    Join Date
    Feb 2008
    Beans
    Hidden!

    Re: Unable to connect to server with SSH using Ubuntu

    http://docs.aws.amazon.com/AWSEC2/la...ncesLinux.html

    correct format might be:
    Code:
     ssh -i /home/$user/.ssh/ec2_key_file ubuntu@ec2-176-34-121-133.eu-west-1.compute.amazonaws.com
    Last edited by Habitual; February 16th, 2013 at 12:19 AM.
    DorkBlog

    If you want something you've never had, then you must do things you've never done.
    Tools every shell scripter should have, explainshell, shellcheck, and crontab sandbox.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •