Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- copyright()
- {
- echo -e "\
- THE \"AULIX_UTILS FOR DEBIAN AND CENTOS\" \n\
- }
- copyright;
- echo "Examples:";
- test_protocol()
- {
- Find=$1;
- if ! cat /tmp/ssh_debug1.log | grep "$Find"; then
- {
- echo "Trying to find: $Find";
- echo "ERROR! Incorrect:";
- cat /tmp/ssh_debug1.log | grep "$Find";
- return 1;
- } fi;
- return 0;
- }
- ( verify )
- #set -x;
- SSHServer=$2;
- ssh -v $SSHServer exit 2>/tmp/ssh_debug1.log;
- if \
- test_protocol "server->client" && \
- test_protocol "server->client chacha20-poly1305@openssh.com" && \
- test_protocol "client->server" && \
- test_protocol "client->server chacha20-poly1305@openssh.com" && \
- test_protocol "Server host key:" && \
- test_protocol "Server host key: ED25519" && \
- test_protocol "Offering" && \
- test_protocol "Offering ED25519 public key";
- then
- echo; echo "All tests passed.";
- else
- echo; echo "Some tests failed!";
- fi;
- ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement