Results 1 to 3 of 3

Thread: Help : Possible Port Error w/ SFTP Connection

  1. #1
    Join Date
    Sep 2006
    Beans
    215

    Help : Possible Port Error w/ SFTP Connection

    When trying to connect using sftp with key authentication, we are getting this error message.

    $ sftp client@hostname.net#2222
    Connecting to client@hostname.net#2222...
    ssh: client@hostname.net: Hostname and service name not provided or found
    Connection closed


    Regarding the error message:

    Hostname and service name not provided or found

    This mainly has to do with DNS being not set up properly..


    We were able to successfully ping the hostname prior to adding the hostname to /etc/hosts & /etc/resolv.conf,
    so it must not really be a DNS issue.


    Given this, we think it may be a port issue. The host uses 2222 for SFTP.

    Can you please advise on what we can do to get SFTP connectivity to this host?

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,758
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Help : Possible Port Error w/ SFTP Connection

    Hi andrew222.

    Try this syntax:
    Code:
    sftp -p 2222 client@hostname.net
    Tell us how it goes.
    Regards.

  3. #3
    Join Date
    Sep 2006
    Beans
    215

    Re: Help : Possible Port Error w/ SFTP Connection

    Thank you papibe...

    Trying that syntax didn't work, but your idea led me to use this, which worked...

    sftp -oPort=2222 client@hostname

    We are using OpenSSH and the host is Tectia.

    If we were using Tectia then perhaps your syntax would work. The people on the host side say #2222 (appended to the end of hostname) will work if the client uses Tectia.

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
  •