Improve how I detect login for ssh

This commit is contained in:
gbaconni
2021-11-08 18:47:19 +01:00
parent 5d29cc3f5f
commit 382b7e13e8
3 changed files with 5 additions and 3 deletions

3
do.sh
View File

@@ -7,8 +7,9 @@ ssh_clean ()
ssh_exec ()
{
login=$(git config user.name || echo $USER)
export SSHPASS="${SSHPASS-Born2beRoot}"
./ssh.exp -p 4242 ${USER}@127.0.0.1 $@ 2>&1 \
./ssh.exp -p 4242 ${login}@127.0.0.1 $@ 2>&1 \
| grep -v -i -e '^Warning: Permanently added' -e ' password:' -e '^spawn ssh'
}