X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ntsimulator%2Fscripts%2Ftls%2Fenable_ssh_key.sh;fp=ntsimulator%2Fscripts%2Ftls%2Fenable_ssh_key.sh;h=5ed2868846a2545cda814f79570ff5ad0bd28e89;hb=29ce368a8b49cb41f3a1640581ff9958ea50ad8c;hp=0000000000000000000000000000000000000000;hpb=1d6c03fcfde03df735f82913ea795a75cd3068d9;p=sim%2Fo1-interface.git diff --git a/ntsimulator/scripts/tls/enable_ssh_key.sh b/ntsimulator/scripts/tls/enable_ssh_key.sh new file mode 100755 index 0000000..5ed2868 --- /dev/null +++ b/ntsimulator/scripts/tls/enable_ssh_key.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +sleep 5 + +SSH_PUB_KEY="$(cat /home/netconf/.ssh/id_dsa.pub| awk '{print $2}')" + +echo 'netconfssh_keyssh-dss' >> load_auth_pubkey.xml +echo ''"$SSH_PUB_KEY"'' >> load_auth_pubkey.xml + +sysrepocfg --merge=load_auth_pubkey.xml --format=xml ietf-system +rm load_auth_pubkey.xml + +ssh-keyscan -p 830 localhost >> ~/.ssh/known_hosts + +echo 'Done' +exit 0 \ No newline at end of file