I am trying to login to my remote machine (Fedora machine) from my local machine (Ubuntu 14.04).

I receive a typical error which seems related to setting of environment variables in my remote machine i.e. Bad : modifier in $ (/).

The entire debugging output of my ssh login is as follows:

praveer@praveer-HP-EliteBook-8460p:~$ ssh -v 's password: debug1: Authentication succeeded (password). Authenticated to imagine2.enpc.fr ([195.221.193.65]:22). debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LC_PAPER = fr_FR.UTF-8 debug1: Sending env LC_ADDRESS = fr_FR.UTF-8 debug1: Sending env LC_MONETARY = fr_FR.UTF-8 debug1: Sending env LC_NUMERIC = fr_FR.UTF-8 debug1: Sending env LC_TELEPHONE = fr_FR.UTF-8 debug1: Sending env LC_IDENTIFICATION = fr_FR.UTF-8 debug1: Sending env LANG = en_US.UTF-8 debug1: Sending env LC_MEASUREMENT = fr_FR.UTF-8 debug1: Sending env LC_TIME = fr_FR.UTF-8 debug1: Sending env LC_NAME = fr_FR.UTF-8 Last login: Thu May 25 13:34:38 2017 from ppp-seco21parth2-46-193-179-253.wb.wifirst.net Bad : modifier in $ (/). 

I know this problem is related to Bad : modifier in $ (/) at the server end.

However how do I make sure that the setting of environment variables is done in a proper format at the remote machine while running the ssh command from my local machine ?

1 Answer

Fix the file on the server. After you ssh in to the server, show what your .bashrc is doing (and which particular line gives the error):

PS4='${BASH_SOURCE}:${LINENO} ' bash -x ~/.bashrc 

Fix that line ON THE SERVER.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy