Im getting below error printed while doing SSH to an ubuntu 20 server. no remote command is executed over ssh.
ubuntu@ip-x-x-x-x:~$ /usr/bin/ssh ubuntu@x.x.x.x
###############################################################
# Authorized access only! #
# Disconnect IMMEDIATELY if you are not an authorized user!!! #
# All actions Will be monitored and recorded #
###############################################################
Last login: Thu Dec 8 05:58:57 2022 from x.x.x.x
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
-e: command not found
ubuntu@given-hostname:~$
Nothings on profile.d or ssh configs that I could find. Does anyone know the source to look for?
When you login to remote server - the shell's log in script is executed (it's located in /home/user/ if you ssh to user@remote, ie on given-hostname->/home/ubuntu when ubuntu@given-hostname).
You can check what shell is executed for that user on remote host:
$ cat /etc/passwd | grep user
$ user:x:1000:1000::/home/user:/bin/bash
If it's bash, the ~/.profile ~/.bashrc ~/.bash_profile are executed (on remote host) on login and in your case some of these contain some command that produces " -e: command not found " - it's impossible to say which without looking into that script files. Check mentioned files for line(s) containing "-e".
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.