Why I cant access a sftp server using my hostname? I can access the ftp server using hostname, but not the sftp server.I have not done any extra mapping for ftp anywhere. But when I tried it with ip address it worked. Why?

And someone point on how can I map this ip address to hostname for sftp?


SFTP in DNS setting is a sub domain.you need a A record for sftp in forward zone for you DNS setting.

sftp.yourdomain.com A

for microsoft DNS Click here

for ubuntu Click here

| improve this answer | |
  • Creating a DNS record has nothing to do with accessing via SFTP. DNS maps names to IP addresses. – Keith Stokes Feb 3 '14 at 13:36
  • you said you can connect with ip,so if you want to do the same with sftp.youromain you should create a DNS record and forward it to sightly ip address. – Hamed Shahinnejad Feb 4 '14 at 8:52

Does the host-name actually resolve to anything? Try an nslookup of the sftp server to see if there's actually a DNS record for it. If not, then you'll need to add a record for the ftp server on your DNS server.

| improve this answer | |

secure shell (SFTP or SSH) requires reverse mapping and forward mapping for DNS, you might need to check on your reverse DNS or FQDN setting on your hostname. Try to do nslookup your_IP_address and see if you get the same FQDN.

| improve this answer | |

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