Setup keys on the Submit Host
$ ssh [email protected]
$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC747i1LltXnYkTTdXw4/qjuSxZS+zgg/kYgTrwdyejgTQPyjKfN0/2HudIdt83C2ZeTKqW1DU16HShKwPFCY8KUHtSgLaw7q4QV1grPMCAX7lZhIja0+pEsrt/30ME5ps51EqSmN4sAk1Jl9FaOi8YVZkuV++8gBwTKe2PKLFQ709HVP4yzJdx2epiJsENszqdTMkcjX4dr11X4C+lZsOxt7kRlH8GZ2CHAG3UGsgFf5sArClhqXMFwGiSCDIpIpL70EsY5u2Dpaj9Tb9lge4RSHzdjn6Ro1++4hBdHSj5FhrdC5cmemts3MMmS752hfU8oHWGdg3ZeMRJEq4ICIJb [email protected]
Copy that key to the master node of the cluster:
pcluster ssh [cluster]
vim ~/.ssh/authorized_keys
# add key to the bottom
Then setup aliases on the master node, changing the ip and username based on the output of pcluster ssh [cluster] -d
:
echo "
# link submit node to master
alias qhost='ssh -i ~/.ssh/id_rsa [email protected] qhost'
alias qrsh='ssh -i ~/.ssh/id_rsa [email protected] qrsh'
alias qstat='ssh -i ~/.ssh/id_rsa [email protected] qstat'
" >> ~/.bashrc
source ~/.bashrc
Warning this won't work for qsub unless the file you're submitting is also on the master instance. You'd need to setup a shared drive and then qsub, for example if /home was shared, then qsub $(pwd)/submit_script.sh
from the home directory would work