⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.60
Server IP:
13.127.59.50
Server:
Linux ip-172-31-46-210 5.15.0-1033-aws #37~20.04.1-Ubuntu SMP Fri Mar 17 11:39:30 UTC 2023 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.3-4ubuntu2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
snap
/
core
/
17210
/
usr
/
lib
/
cloud-init
/
View File Name :
write-ssh-key-fingerprints
#!/bin/sh # This file is part of cloud-init. See LICENSE file for license information. logger_opts="-p user.info -t ec2" # rhels' version of logger_opts does not support long # for of -s (--stderr), so use short form. logger_opts="$logger_opts -s" # Redirect stderr to stdout exec 2>&1 fp_blist=",${1}," key_blist=",${2}," { echo echo "#############################################################" echo "-----BEGIN SSH HOST KEY FINGERPRINTS-----" for f in /etc/ssh/ssh_host_*key.pub; do [ -f "$f" ] || continue read ktype line < "$f" # skip the key if its type is in the blacklist [ "${fp_blist#*,$ktype,}" = "${fp_blist}" ] || continue ssh-keygen -l -f "$f" done echo "-----END SSH HOST KEY FINGERPRINTS-----" echo "#############################################################" } | logger $logger_opts echo "-----BEGIN SSH HOST KEY KEYS-----" for f in /etc/ssh/ssh_host_*key.pub; do [ -f "$f" ] || continue read ktype line < "$f" # skip the key if its type is in the blacklist [ "${key_blist#*,$ktype,}" = "${key_blist}" ] || continue cat $f done echo "-----END SSH HOST KEY KEYS-----"