# Connecting to LAN Computers



## George Daxon (Jan 18, 2017)

I moved this post from an another chain.

I have now connected the FreeBSD computer to the internet via Ethernet.  I managed to assign it a static IP address via my gateway and the FreeBSD computer has successfully pinged the gateway......feeling good.

My windows computer on the same LAN is able to ping the FreeBSD computer.  However the FreeBSD cannot ping the windows computer.  

I would like to log into the FreeBSD computer from my windows based computer on the same LAN.  

Any suggestions?


----------



## obsigna (Jan 18, 2017)

Since you can ping from your Windows to your FreeBSD machine, chances are that SSH connections from Windows to the FreeBSD box simply work.

On your FreeBSD machine add sshd_enable="YES" to the file /etc/rc.conf and restart. On your Windows computer
install PuTTY. See also the PuTTY documentation. Anyway, with that, you should be able to establish a SSH connection to your FreeBSD box.


----------



## George Daxon (Jan 19, 2017)

The file I have in /etc is rc.conf,v.  It has the sshd enable command line, so I assumed it was the correct file.  I am not sure why my file has the ",v" at the end.

Also, I added the ifconfig data into this same file; however, the information for the inet and netmask will not load automatically.  Am I missing the correct file?


----------



## Deleted member 9563 (Jan 19, 2017)

No idea where the ,v came from. Just `cp rc.conf,v rc.conf` and things should work.


----------



## George Daxon (Jan 19, 2017)

Thanks, I will try that.  The PuTTY is not connecting.  I will look through the readme and get a better understanding.


----------



## aragats (Jan 19, 2017)

George Daxon said:


> FreeBSD cannot ping the windows computer


As far as I remember in all MS Windows from 7 and up the firewall blocks ICMP (ping response) by default.
There are many places with directions, e.g. this one.


----------



## aragats (Jan 19, 2017)

George Daxon said:


> The PuTTY is not connecting


I would suggest to turn Windows firewall off first, to make sure that putty works. Putty itself is very simple and reliable software, never has a problem.
Make sure that your sshd in FreeBSD is running:
	
	



```
ps aux | grep ssh
```


----------



## shuxuef (Jan 19, 2017)

George Daxon said:


> The file I have in /etc is rc.conf,v.  It has the sshd enable command line, so I assumed it was the correct file.  I am not sure why my file has the ",v" at the end.
> 
> Also, I added the ifconfig data into this same file; however, the information for the inet and netmask will not load automatically.  Am I missing the correct file?



Typically files with names ending with ",v" are RCS (revision control system, rcs(1)) files. If that's really what your rc.conf file is, then you shouldn't blindly copy the file into rc.conf; rather, you should use co(1) to check out a particular version of the file; for example, after you've done `cd /etc/` to change the working directory to /etc, you can then do `co -l rc.conf,v` to obtain a copy of the latest version of /etc/rc.conf. You can then start to edit the new /etc/rc.conf generated by the command. 

However, the rc.conf file is (mostly) only for start-up configuration of the system. After you edit the file, you still need to start the corresponding daemons. The fastest way to start sshd(8) without rebooting the system is to use `# service sshd onestart`, regardless whether you have edited rc.conf or not. If you want the system to start sshd(8) at boot, then you can add a corresponding entry to rc.conf; otherwise, this step is really not necessary.


----------



## Gdan (Jan 19, 2017)

Another thing to look at is your  firewall/pf rules if you have pf running on the BSD box.  Some of the "standard" pf rules you see floating around online block ssh connections even over your local network.


```
# less /etc/pf.conf
```


----------



## SirDice (Jan 19, 2017)

George Daxon said:


> I am not sure why my file has the ",v" at the end.


You probably entered `ci /etc/rc.conf` instead of `vi /etc/rc.conf` accidentally. I get that too if I try to type faster than my fingers will allow


----------



## George Daxon (Jan 19, 2017)

As it turns out, you are correct.  I did not see your post and copied the ",v" file as rc.conf.  This was the kiss of death for my internet.  To make matters worse, the new rc.conf file is read only.  I tried to change the permissions, but it will not let me.  Therefore, I cannot delete the file.  AI believe both rc files are impacting the boot process because I no longer get a login prompt.  

The FreeBSD computer is a test computer.  I might reinstall from scratch


----------



## chrbr (Jan 19, 2017)

George Daxon said:


> I might reinstall from scratch


You can also consider to boot from you installation media and start a shell. From the shell mount the root file system of the computer. Then it should be possible to access all files and to fix the issue.


----------



## wblock@ (Jan 21, 2017)

George Daxon said:


> I might reinstall from scratch


The "Windows method" should not be necessary.  Log in to the FreeBSD system from the keyboard, then edit /etc/rc.conf.


----------

