We use cookies on our website to analyze website usage and to help secure the website against misuse. Advertising and functional cookies are not used in our site or our web application products.
By clicking “Accept Essential Cookies Only”, you consent to us placing these cookies.
xAssets Network Discovery is able to discover Apple Mac, Linux, Unix, AIX and any other UX flavor computers through the SSH protocol. This is achieved by using SSH to connect to each Apple Mac device and extract asset data. SSH must be enabled on each Apple Mac device to allow the discovery process to work.
To enable SSH on an Apple Mac, follow these steps:
Apple Mac discovery requires a Credential Pack for SSH.
Log into xAssets and click Discover > Prepare > Manage Credentials
Click "New" at the top of the screen
Name the pack "Apple", complete the credentials, and then click OK to save.
It is also possible to create a "matching" credential pack. When these packs exist, discovery will inspect the ping footprint of the asset being pinged, and use the appropriate credential pack based on the ping footprint. To save a matching credential pack, use the same instructions as above, but choose "Matching Pack" from the "Credential Type"" dropdown.
Matching credential packs do not need a "name", you simply specify the technology and if needed the Computer Name or IP range which the matching pack will match against.
Click "Discover" > "Discover" > "Discover a Computer or IP Range". Enter the IP address of the Apple Mac computer, choose the credential pack name just entered, and click "OK".
If a "Matching Credential Pack" was created, the discovery process will use the matching pack without needing to specify the credential pack.
Discovery of Apple computers typically takes 10-20 seconds per device, compared to 2-4 seconds for windows. However, in the default configuration, up to 25 devices can be discovered in parallel per subnet, with up to 3 subnets running in parallel, so the overall discovery time is not significantly impacted by the number of devices chosen. There is also a short time window to transfer the data back to the application server and load it into the Asset Management Database.
When completed, the assets will show under the appropriate category in the Asset Register:
Click the asset description to drill down into the asset
Use the tabs on the left to view more detailed information on hardware and software:
This is an alternative to the "Enable SSH" section above, and in practical terms it is more effort than using the dialogs above, but discovery was required on a larger number of Apple Macs, this code could be scripted, although there may be some difficulty around editing the "Allow access for" list of permitted users which is stored in the "sshd_config" file.
Open a terminal window (Command (⌘) + Space, then type "Terminal" and press Enter)
Enable SSH
Cmd + Space
and type "Terminal").
sudo systemsetup -setremotelogin on
Grant Full Disk Access
/usr/sbin/sshd
and
/usr/sbin/sshd-keygen-wrapper
, which are typically located in the
/usr/sbin/
directory. Select both files and click "Open".
Add Users for SSH Login
sshd_config
).
sudo nano /etc/ssh/sshd_config
# AllowUsers
(remove the
#
at the beginning of the line if it's commented out) and add the usernames separated by spaces. For example:
AllowUsers user1 user2
Restart SSH
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
This should have enabled SSH on the Mac and users specified in the
AllowUsers
directive will be able to log in via SSH. Full disk access should have been granted to SSH sessions.
If you did want to put all this into a script to run on multiple computers, this is a draft script which you can edit. Take care to ensure that the sed edits are working as intended
# Enable SSH
sudo systemsetup -setremotelogin on
# Grant Full Disk Access
sudo tccutil --insert /usr/sbin/sshd
sudo tccutil --insert /usr/sbin/sshd-keygen-wrapper
# Add Users for SSH Login
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config_backup # Backup the original configuration file
sudo sed -i '' '/AllowUsers/s/.*/AllowUsers user1 user2/' /etc/ssh/sshd_config # Replace user1 and user2 with desired usernames
# Restart SSH
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
echo "SSH configuration completed"
Free instances are free forever and can show demo data or your data.