i used to work on a server and it had a host name of myserver.homeunix.com and i was wondering how i would set it up so that i could access my server with a host name instead of a ip address
Printable View
i used to work on a server and it had a host name of myserver.homeunix.com and i was wondering how i would set it up so that i could access my server with a host name instead of a ip address
I know that http://www.dyndns.com/ has free domain names like that. I have used them in the past (like several years ago) and they worked find for me
If you don't want to set up a publicly registered domain name, you can set a host alias just for yourself. On the client machine, edit /etc/hosts and add a line with the server's IP address followed by the host name you want to use.
Of course, that's really only a good solution if you work from only one client machine. Otherwise you'd have to edit /etc/hosts on every client you use. If you're using multiple clients, a registered domain name is probably the way to go.
ok, iv registerd it on dyndns but its saying connection refused its also saying connection refused when i type in an ip address but iv startes ssh on the gentoo box
I've only seen the "connection refused" message when the ssh daemon isn't running or I try to connect to the wrong port.
If you typeon the server, do you get a line that ends with sshd? If not, the daemon isn't running.Code:ps -e | grep ssh
i do get a line ending in sshd. how do i find out my port number?
Ssh runs on port 22 by default. You can check your port number by looking in the sshd_config file (on Debian, it's at /etc/ssh/sshd_config; Gentoo may have it in a different location). Near the top of the file is a line that says something like Port 22. You can change that number to whatever port you want. Some people recommend changing it to anything but 22, to ward off brute-force attacks that are looking to get in on the default port.
Another possibility is that a firewall is blocking that port.
/etc/ssh/sshd_config is not the config file on gentoo i am curently looking into what it it is. but i am on a work pc and have just tried to connect to my linux box through putty and it came up with "no route to host" it that meaning that i am been blocked by a firewall or is there a problem with the box? and does the box have to be logged off when i connect?