Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Below password does NOT work
- #USER_PASS="Eb*rx>BN?3x3SKd"
- # Below password works!
- USER_PASS="qwer1234"
- # 2: Create sample user and set password
- USER="sampleuser"
- ssh root@$HOST "useradd -m $USER -s /bin/bash"
- ssh root@$HOST "echo $USER:$USER_PASS | chpasswd"
- ssh root@$HOST 'cat /etc/passwd'
- echo "test ssh login with $USER"
- sshpass -p $USER_PASS ssh $USER@$HOST
Add Comment
Please, Sign In to add comment