NVIDIA Sync fails to add new host with error "Invalid Argument Host already exists"

I’m hitting an error connecting to my Spark with the NVIDIA Sync on macOS. I’ve looked for the ssh_config ( per DGX Spark / GB10 FAQ ) and the config isn’t yet present. I am able to manually ssh from my terminal to the Spark and login in successfully. Any ideas what is going wrong?

@rickeerickson on your MacOS under $USER/.ssh and delete the offending host name from known_hosts

No joy. I’m still getting the error.

In that case quit Sync app and delete all the files in /Users/$USER/Library/Application Support/NVIDIA/Sync/config/

The config files will be recreated. Sample list output:

-rw-rw-rw-@ 1 elsaco staff 32 Oct 24 19:40 first-run.json
-rw-------@ 1 elsaco staff 420 Oct 24 19:40 nvsync.key
-rw-------@ 1 elsaco staff 133 Oct 24 19:40 ssh_config
-rw-rw-rw-@ 1 elsaco staff 2670 Oct 24 19:42 state-store.json

and sample ssh_config:

elsaco@m4max config % cat ssh_config

Host spark
Hostname spark
User tux
Port 22
IdentityFile “/Users/elsaco/Library/Application Support/NVIDIA/Sync/config/nvsync.key”

@rickeerickson If you remove any wildcard host matches from you ~/.ssh/config it should work. I had something like this:

Match Host *.lan
    User username

Which caused it to fail completely.


For the Nvidia developers. I ran nvsync-arm64 connect <hostname> and that gave me the following error:

{
“heading”: “Unexpected Error”,
“details”: “problem parsing ssh config file: (5, 7): ssh_config: Match directive parsing is unsupported”
}

Since you are using golang under the hood, my PR is still hanging in the wind in the ssh_config parser: Add support for Match (Fixes #6) by sio2boss · Pull Request #67 · kevinburke/ssh_config · GitHub so you might want to fork from there.

1 Like

I had the same error, following a system-restore image on my DGX-Spark. Removed entry from ~/.ssh the old entry, but Nvidia-Sync was still holding on to the old hostname for some reason.

I tried to delete the old DGX-Spark reference from nvsync menu, but that didn’t remove it from the ~/Library/Application\ Support….\ssh_config file.

I added a new entry by IP address and that worked.

HI Larry,

if the you reimage the Spark, you’ll need to remove the machine from Sync and re-add it, as the Spark machine has lost configuration that Sync does when adding the machine.

In the meantime, engineering is reviewing this feedback and will improve future experiences.

I tried deleting the entry from NVSync. That took it out of the menu, but attempting to re-add after the image restore by the advertised “spark-abcd.local” resulted in the same “Invalid Argument Host Already Exists” error mentioned in this thread. (MacOSX version of Sync)

I had already removed the “spark-abcd.local” entry from ~/.ssh/known_hosts file locally on my Mac.

I re-added it by IP address rather than my local domain name and that worked fine.

I did check the ~/Library/Application Support/NVIDIA/Sync/config/ directory on my Mac.

As mentioned, the “ssh_config” file in that directory still contains a stale reference to the DGX-Spark, as elasco pointed out.

I don’t know if that is the root, cause, but the problem persists if I try to add it by the same name, even though it doesn’t appear in the Sync UI menu.

Re-imaging did cure the issue with DGX Spark and I’m able to work with it, Sync, WorkBench, ssh and other tools just fine now.

Great, thanks, I should have ran the command directly as well:

```
{
“heading”: “Unexpected Error”,
“details”: “problem parsing ssh config file: (81, 7): ssh_config: Match directive parsing is unsupported”
}
```

Should you be able to connect from more than one mac?
or does the sync pair with only one client?

Still get this error on Ubuntu Linux after applying all these fixes. I can ssh into the spark, access dashboard etc.

But even after I remove the key from known hosts and remove all files under ~/.config entirely I still get this error

I had a match condition for something called platform.sh and removing the entry fixed it for me

it was something like “*.platform.sh” in the ssh_config file

Had the same issue after removing devices from the Sync app.

Problem was the Include NVIDIA adds to the ~/.ssh/config file:
Include “/Users/lancecleveland/Library/Application Support/NVIDIA/Sync/config/ssh_config”

That ssh_config file in the NVIDIA/Sync directory has all the device names I used previously. (Sync app should probably delete those if you delete a device from the UX, just my opinion.)

Removed those lines, re-added the device with no errors.

I had this as a draft - not sure if this still helps?

If multiple NVIDIA sync installs are using the same remote account then they are sharing the device specific NVIDIA sync configuration. Things like ports and custom application scripts are stored on the remote machine (DGX Spark) and are accessible by any NVIDIA sync installs that share the same remote user account.