Ssh
Command
ssh username@10.0.0.11 -vvvvA
Providing -vvvvA
will give you debug logs for ssh connection.
Generate Key
Generating a new SSH key and adding it to the ssh-agent
Adding Key
Adding a new SSH key to your Git Cloud hosted service
Auto SSH
It is like a daemon to monitor the service / like a watchdog to restart the service if it crashes or stops abruptly.
autossh restart
Stack Exchange | How to reliably keep an SSH tunnel open?
Copy Files SCP
scp nomachine_8.11.3_5.dmg username@10.523.325.212:/Users/username/directoryName
how-to-use-scp-to-transfer-files-in-the-macos-terminal
netrc
Auto Login | netrc
The .netrc file contains login and initialization information used by the auto-login process. It generally resides in the user’s home directory, but a location outside of the home directory can be set using the environment variable NETRC
. Both locations are overridden by the command line option -N. The selected file must be a regular file, or access will be denied.
For us using the netrc file does the trick. But note that besides:
machine github.com
login <username>
password <personal access token>
You also need to add this if your Package.swift points to binaries stored in GitHub package registry:
machine maven.pkg.github.com
login <username>
password <personal access token>
Took me quite a while to figure this out, but sub domains are not included in the machine definitions, so specify them individually.
swift forums thread source | resolving private packages through HTTPS with xcodebuild
Errors
kex_exchange_identification: Connection closed by remote host