# how do I email or communicate between two iMacs?



## OldSubSailor (Jan 31, 2019)

I have an older freebsd command line iMac, and a new iMac (macOS 10.14.x). After searching and reading various support websites, I see that folks often include information such as log results in their discussions. As best as I can figure, I need to be able to get such things from the freeBSD iMac to the new iMac so that I can take care of matters using the GUI. I'm got to thinking that I could do this by by at least being able to send email from freeBSD to this, newer iMac via my Comcast ISP. 
I have looked around the forums but decided to ask ya'll for clarification.
Does that mean that I will need to set up an email server on the freeBSD machine, and is the term server sort of generic catch phrase?  In looking at the forum discussions, it looks like people talk about sendmail, then say that it is very complex, and that one should install as many as 3 different programs to get things running. 

I also guess that I could try using a usb flash drive, but I would need to ensure that it could be read by both freeBSD and macOS. I still will need to find how to locate and copy a file(S) to the stick from freeBSD.
I would appreciate your advice. 
So much to learn, but so old to learn much!


----------



## obsigna (Jan 31, 2019)

Are both machines connected to the same router of your ISP? In case yes, then figure out the local IP-Adresses and then you would be able to do everything you need using direct network connections via ssh(1), scp(1) and/or NFS (exports(5)). For example you want to try to ping the FreeBSD machine from a Terminal window of a macOS machine:

On the FreeBSD box type `ifconfig` and take notice of its local IP-Address, for example: 192.168.1.129
Open the Terminal App on macOS (it is in the Utilities directory of /Applications), and in there type `ping 192.168.1.129`, of course you need to replace 192... by the actual IP-Address.

In case this does not work out, then data exchange via an USB stick is reasonably easy. You would need to prepare a MS-DOS-FAT32 formatted Memstick - The Disk Utility App of macOS can do this. Both, macOS and FreeBSD can read this format.


----------



## twllnbrck (Jan 31, 2019)

OldSubSailor said:


> I also guess that I could try using a usb flash drive, but I would need to ensure that it could be read by both freeBSD and macOS. I still will need to find how to locate and copy a file(S) to the stick from freeBSD.


I think you can go with a FAT32 flash drive - its readble by *BSD and Mac. You can mount the stick in FreeBSD with

```
# mount -t msdosfs /dev/da0s1 /media
```
Just make sure you use the correct storage device node (here da0s1). Then you can copy files to /media.


----------



## twllnbrck (Jan 31, 2019)

I was too late . obsigna submitted faster..


----------



## Deleted member 9563 (Feb 1, 2019)

I have multiple machines running different operating systems here. I find it's pretty quick to just use command line FTP locally. I don't think there is any OS that can't do that. It even works with a primitive DOS machine!


----------



## roddierod (Feb 1, 2019)

OJ said:


> I have multiple machines running different operating systems here. I find it's pretty quick to just use command line FTP locally. I don't think there is any OS that can't do that. It even works with a primitive DOS machine!



I second this method. And note that Filezilla works on all the BSDs I have (Free, Open, DragonFly), Mac OS and Windows (7 through 10) just incase you want something with a GUI to do your FTPing.


----------



## rigoletto@ (Feb 1, 2019)

If the objective is to send/sync files between them: net/syncthing for the win.


----------



## OldSubSailor (Feb 1, 2019)

rigoletto@ said:


> If the objective is to send/sync files between them: net/syncthing for the win.





rigoletto@ said:


> If the objective is to send/sync files between them: net/syncthing for the win.



Thank you for the reply, however, to quote the bard, ¿por que?


----------



## OldSubSailor (Feb 1, 2019)

obsigna said:


> Are both machines connected to the same router of your ISP? In case yes, then figure out the local IP-Adresses and then you would be able to do everything you need using direct network connections via ssh(1), scp(1) and/or NFS (exports(5)). For example you want to try to ping the FreeBSD machine from a Terminal window of a macOS machine:
> 
> On the FreeBSD box type `ifconfig` and take notice of its local IP-Address, for example: 192.168.1.129
> Open the Terminal App on macOS (it is in the Utilities directory of /Applications), and in there type `ping 192.168.1.129`, of course you need to replace 192... by the actual IP-Address.
> ...


=========================
Well, I got to messing with ssh, and things looked really interesting.  I can access the freeBSD iMac, via the new iMac. It's cool in a way. I can sit there and use the macOS terminal in the freeBSD 'environment', so that's fun.  Alas, I have run afoul of something when trying to use scp. After much piddling around it looks like I got the command line text entered correctly, but when I tried to send a file from the freeBSD to the macOS machine, it looks like it used port 22 and then the connection was refused.   I suppose that because I am in a "combined" environment, I can simply use the GUI cut and paste ability of macOS.  Not to mention no need for X11 for now, pffffffft!


----------



## BSD User (Feb 1, 2019)

OldSubSailor said:


> but when I tried to send a file from the freeBSD to the macOS machine, it looks like it used port 22 and then the connection was refused.



You should check Sharing settings in the System Preferences on your iMac. Make sure Remote Login is enabled. If everything looks good disable Firewall in the Security & Privacy settings.


----------



## obsigna (Feb 1, 2019)

In addition to the good hints of BSD User, you can use the scp(1) command also on your Mac for fetching a file from the FreeBSD machine. That said, scp is useful for both direction, pushing and fetching, and therefore, most probably, you want to enable Remote Login on the Mac as well, like BSD User said.


----------



## NapoleonWils0n (Feb 1, 2019)

Another option is to use netcat to send files between Freebsd and Mac osx,
the advantage is you dont need to set up a ssh server and generate ssh keys

* computer receiving file

replace 6881 with the port of your choice
and make sure the port is open in your firewall on the receiving computer


```
nc -lv 6881 > outfile.txt
```

* computer sending file

replace 192.168.1.3 with the ip address of the receiving computer


```
nc -w 3 192.168.1.3 6881 < infile.txt
```


----------



## rigoletto@ (Feb 1, 2019)

OldSubSailor said:


> Thank you for the reply, however, to quote the bard, ¿por que?



One time the syncthing folder(s) is configured everything happens automatically, syncing anything you place in there.


----------



## OldSubSailor (Feb 1, 2019)

BSD User said:


> You should check Sharing settings in the System Preferences on your iMac. Make sure Remote Login is enabled. If everything looks good disable Firewall in the Security & Privacy settings.




That appeared to be the fix!!
I guess that I will know for sure as I play with it, but when I did things just like I did before it, it worked!!

$ scp *poem* <node>:/Users/trav
The authenticity of host 'newIimac.morestuffhere.tx.isp (#.#.#.##)' can't be established.
====> NOTE: this is the point where things crashed and failed to connect
ECDSA key fingerprint is number code?????????????.
No matching host key fingerprint found in DNS.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '<node>' (ECDSA) to the list of known hosts.
Password:

*poem   *                                                                                                                                                                              100%  263     7.4KB/s   00:00

And there it was, moved from the old iMac to the new iMac


----------



## OldSubSailor (Feb 2, 2019)

NapoleonWils0n said:


> Another option is to use netcat to send files between Freebsd and Mac osx,
> the advantage is you dont need to set up a ssh server and generate ssh keys
> 
> * computer receiving file
> ...



Alas, but from Apple Support, "OS X v10.5.1 and later include an application firewall you can use to control connections on a per-application basis (rather than a per-port basis)" I do not know if addressing ports is even workable anymore.


----------



## OldSubSailor (Feb 2, 2019)

rigoletto@ said:


> One time the syncthing folder(s) is configured everything happens automatically, syncing anything you place in there.




Oh, I see, that is software that one would download and install.


----------

