Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as off-topic by Tom O'Connor Feb 5 at 7:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Tom O'Connor
If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers 3

up vote 0 down vote accepted

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 1.2.3.4

for microsoft DNS Click here

for ubuntu Click here

share|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 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 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.

share|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.

share|improve this answer

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