n9mfk
Posts: 26
Joined: Fri Nov 09, 2012 10:39 pm

host name ?

Fri Dec 14, 2012 7:00 pm

Hi All,
im using putty on win 7 to ssh to my pi
if i us ip address it works but if i use host name raspberrypi i got host not found
what can i do to fix this? thanks Beau

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: host name ?

Fri Dec 14, 2012 7:41 pm

It doesn't work because 'raspberrypi' is not a valid hostname.

Richard S.

n9mfk
Posts: 26
Joined: Fri Nov 09, 2012 10:39 pm

Re: host name ?

Fri Dec 14, 2012 8:13 pm

how do i find the do find hostname ?
thanks Beau

Oardinator
Posts: 2
Joined: Mon Jul 23, 2012 7:36 pm

Re: host name ?

Fri Dec 14, 2012 8:20 pm

To get your Raspberry Pi to show it's hostname on a windows network you need to first enable NetBIOS over TCP/IP on your nic. To do this right click on the network connection and selection properties. Select Internet Protocol Version 4 (TCP/IPv4) and click the properties button. In the next dialog click on the advanced button which will bring up the Advanced TCP/IP dialog. Select the WINS tab and enable NetBIOS over TCP/IP.

On the Raspberry Pi you need to install samba and winbind
$ sudo apt-get install samba
$ sudo apt-get install winbind

Edit /etc/nsswitch.conf to enable wins
change 'hosts: files dns' TO 'hosts: files wins dns'

To change the hostname
edit /etc/hostname

FYI 'raspberrypi' works just fine as a host name

$ sudo reboot

User avatar
joan
Posts: 12745
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: host name ?

Fri Dec 14, 2012 9:20 pm

Doesn't Windows have a HOST file? Might be simpler just to add an entry to that, e.g.

192.168.1.13 raspberrypi

User avatar
malakai
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: host name ?

Fri Dec 14, 2012 9:24 pm

You can find a Windows hosts file by typing in the run line

%systemroot%\system32\drivers\etc\

Open and edit in notepad but best to put a static IP on the Pi
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

n9mfk
Posts: 26
Joined: Fri Nov 09, 2012 10:39 pm

Re: host name ?

Fri Dec 14, 2012 10:37 pm

samba an winbind worked great

thanks beau

thrawn
Posts: 1
Joined: Fri Mar 21, 2014 5:38 pm

Re: host name ?

Fri Mar 21, 2014 5:40 pm

@quardinator thank you very much.

Return to “Raspbian”

Who is online

Users browsing this forum: Baidu [Spider], Mortimer and 29 guests