ssh remote access to server

Discussion related to network/web services such as Apache, BIND Sendmail, etc.

ssh remote access to server

Postby saxophonemaster » 25 Dec 2011, 08:03

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
[CMD=" "]ssh -Cxl userID IPAddress[/CMD]

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
saxophonemaster
Junior Member
 
Posts: 2
Joined: 25 Dec 2011, 07:52

Postby gzbk » 25 Dec 2011, 09:45

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 [FILE]nslookup host.domainName[/FILE], 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 [FILE]/etc/hosts[/FILE] file.

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

Regards,
Gzbk.
gzbk
Junior Member
 
Posts: 5
Joined: 04 Dec 2011, 20:53

Postby SirDice » 25 Dec 2011, 11:07

A URL redirect only works for HTTP, not SSH.

You need to add an [file]A[/FILE] DNS record to your domain.

http://en.wikipedia.org/wiki/List_of_DNS_record_types
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16161
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands


Return to Web & Network Services

Who is online

Users browsing this forum: No registered users and 0 guests