I'm connecting to another pc via ssh terminal, and I'm able to, but there appeares two lines which are driving me crazy

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted applicable law.
Last login: Thu May 23 12:45:03 2019 from
bash: /home/user/newUser: No such file or directory
bash: /home/user/newUser: No such file or directory

newUser it's a Script which doesn't belongs on there, so I'm wondering how could I remove these lines

$ grep newUser ~/.bashrc ~/.profile ~/.bash_profile ~/bash.login ~/.bash_aliases /etc/bash.bashrc /etc/profile /etc/profile.d/* /etc/environment 2>/dev/null
/home/user/.profile:bash /home/olduser/newUser
/home/user/.profile:bash /home/olduser/newUser
  • Does grep newUser ~/.bashrc return anything? – dessert May 24 '19 at 7:14
  • Nope, it doesn't return anything – Sayrer May 24 '19 at 7:15
  • Or in any other of your dotfiles? – dessert May 24 '19 at 7:23
  • 2
    Please edit your question and show us the results of this command when run on the remote server, after you log in via ssh: grep newUser ~/.bashrc ~/.profile ~/.bash_profile ~/bash.login ~/.bash_aliases /etc/bash.bashrc /etc/profile /etc/profile.d/* /etc/environment 2>/dev/null. That will tell us which of the startup files is the problem. – terdon May 24 '19 at 7:26

The offending file is ~/.profile on the remote system. Just open that file in your favorite text editor:

nano ~/.profile

Find these lines (looks like the line is repeated 2 times):

bash /home/olduser/newUser

And delete them. That should solve the problem.

| improve this answer | |

Your Answer

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