Puddinq.com sharing knowledge

Remote execution of local aliases / functions

Remote execution of local aliases / functions

Bash article icon

Make a function sshs to alias ssh and add a cutom file

sshs() {
        ssh $@ "cat > /tmp/.bashrc_temp" < ~/.bashrc_remote
        ssh -t $@ "bash --rcfile /tmp/.bashrc_temp ; rm /tmp/.bashrc_temp"
}

now in that custom file you can put functions