LinuxQuestions.org
Visit Jeremy's Blog.
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, 04: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, 04: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 04:50 PM.
 
Old 04-30-2010, 04: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, 05: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 08:46 AM
Hostname for SSH llagunocap Linux - Newbie 10 05-16-2008 08:57 AM
can't ssh using hostname deepesh1081 Linux - Networking 1 05-06-2007 08:11 AM
can ssh by IP, can't by hostname. FLOODS Linux - Networking 7 09-19-2005 02:41 PM
can't ssh through hostname romel Linux - Networking 4 07-25-2004 02:54 PM


All times are GMT -5. The time now is 04:43 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration