Guest User

Untitled

a guest
Nov 19th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. # Below password does NOT work
  2. #USER_PASS="Eb*rx>BN?3x3SKd"
  3.  
  4. # Below password works!
  5. USER_PASS="qwer1234"
  6.  
  7. # 2: Create sample user and set password
  8. USER="sampleuser"
  9. ssh root@$HOST "useradd -m $USER -s /bin/bash"
  10. ssh root@$HOST "echo $USER:$USER_PASS | chpasswd"
  11. ssh root@$HOST 'cat /etc/passwd'
  12. echo "test ssh login with $USER"
  13. sshpass -p $USER_PASS ssh $USER@$HOST
Add Comment
Please, Sign In to add comment