ssh¶
La configuration SSHD est stockée dans /private/etc/ssh/sshd_config
Pour démarrer ou arrêter SSHD:
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
# On crée un alias bash pour redémarrer sshd:
alias restartsshd='sudo launchctl stop com.openssh.ssh-agent; sudo launchctl start com.openssh.ssh-agent;'
# Liste des services:
launchctl list | grep openssh
Changer le port ssh (22 par défaut) sur macOS:
https://apple.stackexchange.com/questions/335324/cannot-change-ssh-port-on-high-sierra
SeKey¶
https://github.com/sekey/sekey
12.6.1 HTTPS vs SSH
If you think you have SSH set up correctly and yet you are still challenged for credentials, consider this: for the repo in question, have you possibly set up GitHub, probably called origin, as an HTTPS remote, instead of SSH?
How to see the remote URL(s) associated with the current repo in the shell:
git remote -v
An SSH remote will look like this: git@github.com:USERNAME/REPOSITORY.git
whereas an HTTPS remote will look like this: https://github.com/USERNAME/REPOSITORY.git
You can toggle between these with git remote set-url: