trungminh
Enthusiast
Enthusiast

Disappear hostname when SSH to ESXi host

Jump to solution

Hello experts,

I just installed fresh the ESXi 5.5u3 host but when ssh to this host is strange, its disappear the host name before ~ command such as attached file.

ssh.PNG

Any one had this issue?

Thanks in advance.

0 Kudos
1 Solution

Accepted Solutions
vHaridas
Expert
Expert

sorry that was Linux settings.

Below is entry in my esxi host /etc/profile.local

export PS1="[$(echo ${VI_USERNAME//'\'/'\\'})@\h:\w] "

this should work, if didn't paste your profile.local file output.

Thanks,

Haridas

Please consider awarding points for "Correct" or "Helpful" replies. Thanks....!!! https://vprhlabs.blogspot.in/

View solution in original post

0 Kudos
5 Replies
vHaridas
Expert
Expert

What output you get for hostname command?

Please consider awarding points for "Correct" or "Helpful" replies. Thanks....!!! https://vprhlabs.blogspot.in/
0 Kudos
trungminh
Enthusiast
Enthusiast

Hello,

Here the output hostname command:

~ # hostname

VM04.Domain.com

~ #

Regards,

0 Kudos
vHaridas
Expert
Expert

If your host is printing correct hostname for hostname command then there is no issue.

You can change esxi command promy by modifying PS1 variable setting in /etc/profile.local.

E.g.

PS1="[\u@\h]"

Logout and login, this setting will show currently logged in usernames hostname.

Please consider awarding points for "Correct" or "Helpful" replies. Thanks....!!! https://vprhlabs.blogspot.in/
0 Kudos
trungminh
Enthusiast
Enthusiast

Hi,

I tried but seems lack of character ~: after hostname.

[root@VM04]cat /etc/profile.local

# profile.local

PS1="[\u@\h]"

[root@VM04]


Do i miss any configuration?


Best regards,

0 Kudos
vHaridas
Expert
Expert

sorry that was Linux settings.

Below is entry in my esxi host /etc/profile.local

export PS1="[$(echo ${VI_USERNAME//'\'/'\\'})@\h:\w] "

this should work, if didn't paste your profile.local file output.

Thanks,

Haridas

Please consider awarding points for "Correct" or "Helpful" replies. Thanks....!!! https://vprhlabs.blogspot.in/

View solution in original post

0 Kudos