From 315021fa5a8a6d0ff60eb71d55ed48cdf1342a09 Mon Sep 17 00:00:00 2001 From: simonzhangsz Date: Wed, 6 Mar 2024 09:28:56 +0800 Subject: [PATCH] add: signle trust script between OMC and NF --- misc/sshcpid.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 misc/sshcpid.sh diff --git a/misc/sshcpid.sh b/misc/sshcpid.sh new file mode 100644 index 00000000..830ce919 --- /dev/null +++ b/misc/sshcpid.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# 判断id_rsa密钥文件是否存在 +if [ ! -f ~/.ssh/id_rsa ];then + ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa +else + echo "id_rsa has created ..." +fi + +ip=$1 +user=$2 +passwd=$3 + +#分发到$ip主机. +expect <