Use ksshaskpass and dialog to return a message after ssh process exiting
This commit is contained in:
parent
21e04b30de
commit
cfd577fc47
@ -1,5 +1,13 @@
|
||||
#!/bin/bash
|
||||
[ "$1" ] && LOCAL_PORT=$1 || LOCAL_PORT=22
|
||||
[ "$2" ] && REMOTE_PORT=$2 || REMOTE_PORT=$(($LOCAL_PORT + 45000))
|
||||
export SSH_ASKPASS=@libexecdir@/openssh/ssh-askpass
|
||||
export SSH_ASKPASS=/usr/bin/ksshaskpass
|
||||
ssh -p 4424 -N -R $REMOTE_PORT:localhost:$LOCAL_PORT assistenza@services.mambasoft.it
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
kdialog --passivepopup "Disconnected from remote support service." --title "mambaSoft remote support" 10
|
||||
elif [ $RET -eq 255 -o $RET -eq 137 ]; then
|
||||
kdialog --passivepopup "Connection to remote support service terminated!" --title "mambaSoft remote support" 10
|
||||
else
|
||||
kdialog --passivepopup "Error connecting to remote support service! ($RET)" --title "mambaSoft remote support" 10
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user