LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-30-2010, 03:31 PM   #1
d-x-4
LQ Newbie
 
Registered: Apr 2010
Posts: 2

Rep: Reputation: 0
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?
 
Old 04-30-2010, 03:48 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 163Reputation: 163
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.

Last edited by rweaver; 04-30-2010 at 03:50 PM.
 
Old 04-30-2010, 03:59 PM   #3
d-x-4
LQ Newbie
 
Registered: Apr 2010
Posts: 2

Original Poster
Rep: Reputation: 0
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?
 
Old 04-30-2010, 04:08 PM   #4
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh login using hostname peeths003 Linux - Networking 8 12-23-2009 07:46 AM
Hostname for SSH llagunocap Linux - Newbie 10 05-16-2008 07:57 AM
can't ssh using hostname deepesh1081 Linux - Networking 1 05-06-2007 07:11 AM
can ssh by IP, can't by hostname. FLOODS Linux - Networking 7 09-19-2005 01:41 PM
can't ssh through hostname romel Linux - Networking 4 07-25-2004 01:54 PM


All times are GMT -5. The time now is 09:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration