0

Using Ubuntu 18.04.5 LTS. A server admin create my account, but it is little bit different with what I know. It seems like ssh does not trigger source $HOME/.bash_profile.

I think the account is not completed somehow. How can I examine the problem

symptom:

  • .bash_profile does not work
  • source: not found
  • unable to auto-complete by tab key
  • prompt starts with $, not [user@localhost ~]$

How can I fix this account?

===== UPDATE =====

it comes out that login shell was not bash

$ echo $SHELL
/bin/sh

Can I set ssh to bash shell for a specific account?

Do not want to any side effects for other accounts or rebooting system or sshd service.

Artur Meinild
  • 31,035

1 Answers1

0

Like reply states, there would be lot of ways to change basic shell to bash. I solved my issue in following method.

  • generate .profile file in home directory
  • add exec bash in the file

so when ssh connected, it triggers .profile, then execute exec bash to change shell.

like @steeldriver mentioned, related question exists, Arrow keys, Home, End, tab-complete keys not working in shell