Quantcast
Channel: calling ssh alias with sshc strange character appear on remote host - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

calling ssh alias with sshc strange character appear on remote host

$
0
0

when calling via ssh alias a remote host, strange characters appear

^[[6;3~fhem@UB9:~$ ;3~
-bash: syntax error near unexpected token `;'

in .bashrc

### add to .bash_aliases, for differentiating between multiple remote hosts
sshhelper() {
    HOST=`echo $1 | cut -d'@' -f2`

    case $HOST in
        fhem )  PROFILE="FHEM" ;;
    esac

    gnome-terminal --window-with-profile=$PROFILE -x  bash -c "ssh $1"
}

#https://superuser.com/questions/347512/can-i-have-my-terminal-background-change-based-on-hostname/1368479#1368479
alias sshc=sshhelper

tried this line with and without ;

        gnome-terminal --window-with-profile=$PROFILE -x  bash -c "ssh $1"

and hints?

thanks


see result of sshc fhem command

enter image description here

enter image description here

and the code

code


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images