VMware Cloud Community
trungminh
Enthusiast
Enthusiast
Jump to solution

Disappear hostname when SSH to ESXi host

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.

Reply
0 Kudos
1 Solution

Accepted Solutions
vHaridas
Expert
Expert
Jump to solution

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

Reply
0 Kudos
5 Replies
vHaridas
Expert
Expert
Jump to solution

What output you get for hostname command?

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

Hello,

Here the output hostname command:

~ # hostname

VM04.Domain.com

~ #

Regards,

Reply
0 Kudos
vHaridas
Expert
Expert
Jump to solution

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/
Reply
0 Kudos
trungminh
Enthusiast
Enthusiast
Jump to solution

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,

Reply
0 Kudos
vHaridas
Expert
Expert
Jump to solution

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/
Reply
0 Kudos