send ssh command with ssh key code example
Example 1: copy ssh keys
pbcopy < ~/.ssh/id_rsa.pub
Example 2: add key file to ssh
sudo chmod 400 [key file]
sudo ssh -i [key file] [username]@[ip]
pbcopy < ~/.ssh/id_rsa.pub
sudo chmod 400 [key file]
sudo ssh -i [key file] [username]@[ip]