First time posting here, so be kind with me. This is a problem I'm facing. A Mac on OSX (10.7.x) is dead on graphic card,so is bootable only in single mode from terminal. I want to get data from disk, but is rather painful to make it from terminal. I need a way to have access to the disk with a GUI from a linux PC. I've read that Macs can use an SSH remote connection natively, but I do not now how to do it and with a GUI support. Can someone give me a step by step advice to connect those two machines (Linux to Mac) and get data from disk the easy way, through using SSH, or other way? Thank you all for reading this, and waiting for some answers.
1 Answer
First, you need to make sure if you have SSH enabled on your Mac. If not you have to enable it.
systemsetup -setremotelogin on
Now, you need to create a group that can remote login.
dseditgroup -o create -q com.apple.access_ssh
After this, you need to add users to this group. Only user or user groups linked to this group will be allowed remote login access.
dseditgroup -o edit -a admin -t group com.apple.access_ssh
Now you have SSH on your Mac which can accept remote connections.
To connect to your Mac, on Ubuntu you need to enter the following command
ssh user@remote_host
remote_host is the IP address or domain name of your remote PC. The Mac in this case. To get IP of your Mac, type in
ifconfig
. user is the username.
To copy over files, you need to use scp or Secure Copy.
Basic command for scp is:
scp user@remote_host:Doccuments/file.txt /some/local/directory
Note: SSH might not work straight away on Mac in single user mode. If it returns an error that says network is not up, try this:
launchctl load /System/Library/LaunchDaemons/com.apple.kextd.plist launchctl load /System/Library/LaunchDaemons/com.apple.notifyd.plist launchctl load /System/Library/LaunchDaemons/com.apple.configd.plist launchctl load /System/Library/LaunchDaemon/com.apple.DirectoryServices.plist launchctl load /System/Library/LaunchDaemon/ssh.plist
-
1thank you for the step y step SSH instructions. need to ask though, aster connection from Ubuntu, will I see mac disk as a mounted disk on Linux Desktop? If nit hiw can this be done with a GUI support? Commented Oct 23, 2016 at 18:45
-
@user3244633 no. You need to setup a samba share, FTP or NFS for that. You can just copy all of your home folder from your Mac to your Ubuntu desktop though– Roh_mishCommented Oct 24, 2016 at 6:59
-
1can you elaborate more on using Samba, FTP or NFS. If these are to be used, how can be installed on mac, since it is only bootable in single user mode? Is there a tutorial for such a case? Commented Oct 24, 2016 at 16:12
-
Hi!, Sorry for the late reply. To enable FTP, you need to launch ftp service using: ' sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist'– Roh_mishCommented Oct 31, 2016 at 16:03