Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AuthorizedKeysCommand /usr/bin/auth
- AuthorizedKeysCommandUser root
- #!/bin/bash
- cn=$1
- server=ldap.myad.net #Put your server IP
- basedn=dc=mydomain,dc=net #Put your basedn
- port=389
- bindUser=myBindUser
- bindPass=myBindUserPassword
- #cn=mathieu
- ldapsearch -LLL -o ldif-wrap=no -x -h $server -p $port -b $basedn -D $bindUser -w $bindPass -s sub "(sAMAccountName=$cn)" | sed -n 's/^[ t]*odiSSHPubKeys:[ t]*(.*)/1/p'
- Apr 18 11:56:26 MLL-HV-UBU-16 sshd[9103]: Invalid user mathieu from 192.168.0.114
- Apr 18 11:56:26 MLL-HV-UBU-16 sshd[9103]: input_userauth_request: invalid user mathieu [preauth]
- Apr 18 11:56:26 MLL-HV-UBU-16 sshd[9103]: Connection closed by 192.168.0.114 port 50152 [preauth]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement