This can be done using functions:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ssh with password and without host signature checking | |
function pssh() {/usr/bin/sshpass -p PASSWORD /usr/bin/ssh -oStrictHostKeyChecking=no USERNAME@$1} | |
# ssh with private key | |
function kssh() {/usr/bin/ssh -oStrictHostKeyChecking=no -i ~/.ssh/key.pem USERNAME@$1} |
Now you can type just something like: kssh 192.168.1.1 or pssh 192.168.1.2
No comments:
Post a Comment