# ssh remote access to server



## saxophonemaster (Dec 25, 2011)

I am completely new to setting up servers so I apologize for not knowing a lot. In the past couple days I've created a FreeBSD server connected to the internet. Now my current issue: I want to remote ssh into the server. This works well when I try to ssh directly to the IP address of the server.

Example
`ssh -Cxl userID IPAddress`

However, I recently bought a domain name so I can access through the domain name (easier to remember). Within the registry place I have the host.domainName as a URL Redirect to the IP address of the server. When I try to login remotely using [CMD=""]ssh -Cxl userID host.domainName[/CMD] it requests for the password, but will never accept the password.

How can I make logging into the server via the host.domainName work as opposed to only remotely accessing through the IP address? Is there a setting on the server I need to change?

Thanks!
Travis


----------



## gzbk (Dec 25, 2011)

Hello,

You said "I have the host.domainName as a URL Redirect to the IP address": actually, to be able to ssh to your domain name, you must have it to be directly associated to your IP address. No URL redirect: if you do a *nslookup host.domainName*, it should show you your own IP address for ssh to be able to use it.

Here, when you try to ssh to your URL redirected domain name, you actually try to open a ssh connection not toward your server, but toward your service provider's server in charge of redirecting the initial HTTP request... which, indeed, does not work as expected .

Depending on the type of offer you subscribed to get your domain name, you may have an option to update the associated DNS records in order to make it point toward your own server's IP address instead of your service provider's one. Otherwise, as a quick fix, do not forget you can also force this locally by adding the link between your domain and the wanted IP address in your /etc/hosts file.

I hope I was clear enough, otherwise do not hesitate to ask  

Regards,
Gzbk.


----------



## SirDice (Dec 25, 2011)

A URL redirect only works for HTTP, not SSH.

You need to add an *A* DNS record to your domain.

http://en.wikipedia.org/wiki/List_of_DNS_record_types


----------

