Update bssh.sh
This commit is contained in:
parent
13c8897dcd
commit
0a76e64642
4
bssh.sh
4
bssh.sh
|
@ -68,10 +68,10 @@ create_local_configuration() {
|
|||
if [ "$auth" == "password" ]; then
|
||||
read -sp "Enter password: " password
|
||||
echo ""
|
||||
echo -e "host: $host\nport: $port\nusername: $username\nauth: $auth\npassword: $password" > "$CONF_DIR/$username.yml"
|
||||
echo -e "# GENERATED BY bSSH AUTO-CONF\nhost: $host\nport: $port\nusername: $username\nauth: $auth\npassword: $password" > "$CONF_DIR/$username.yml"
|
||||
elif [ "$auth" == "key" ]; then
|
||||
read -p "Enter path to private key: " key_path
|
||||
echo -e "host: $host\nport: $port\nusername: $username\nauth: $auth\nkey: |" > "$CONF_DIR/$username.yml"
|
||||
echo -e "# GENERATED BY bSSH AUTO-CONF\nhost: $host\nport: $port\nusername: $username\nauth: $auth\nkey: |" > "$CONF_DIR/$username.yml"
|
||||
sed 's/^/ /' "$key_path" >> "$CONF_DIR/$username.yml"
|
||||
else
|
||||
echo "Unknown authentication method: $auth"
|
||||
|
|
Loading…
Reference in New Issue