LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ssh hostname (http://www.linuxquestions.org/questions/linux-networking-3/ssh-hostname-805224/)

d-x-4 04-30-2010 04:31 PM

ssh hostname
 
I've setup openssh in my ubuntu.

I've also enabled it by
Code:

sudo /etc/init.d/ssh start
How can I learn what's my hostname so the others can login to my pc?

rweaver 04-30-2010 04:48 PM

Unless you have dns setup for your host name they still wont be able to, nor will they be able to if you're behind a nat'd connection (private address ranges 172.16.0.0/12 192.168.0.0/16 10.0.0.0/8) unless you forward the ports.

The easiest thing to give is an ipaddress which you can get by typing:

Code:

ifconfig | grep "inet addr" | awk '{print $2}' | cut -f2 -d: | grep -v 127.0.0.1
Again if it starts with 172.16-31.x.x, 192.168.x.x, or 10.x.x.x you need your external address and need to setup port forwarding on your firewall/router.

d-x-4 04-30-2010 04:59 PM

That revealed my ip address (I think).

Can you tell me step by step how the others can login like
Code:

ssh username@pcname.cs.etc
and not like
Code:

ssh username@xxx.xxx.xxx.xxx
I need a hostname to do that. Can I get one? How?

rweaver 04-30-2010 05:08 PM

You could use a dynamic dns service (dyndns.org) they have instructions for setup and updating records.


All times are GMT -5. The time now is 10:22 AM.