Weird prefix while in SSH

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












When I ssh into a particular server, I get a weird prefix that looks like a box with the characters 001B, and a "k" behind the vertical "0B". See the picture below.



enter image description here



How do I fix this?



I think it must be a setting in a bashrc or bash_profile somewhere







share|improve this question






















  • This is yet another variant on unix.stackexchange.com/questions/418157 , unix.stackexchange.com/questions/248299 , and others.
    – JdeBP
    Mar 7 at 21:19














up vote
0
down vote

favorite












When I ssh into a particular server, I get a weird prefix that looks like a box with the characters 001B, and a "k" behind the vertical "0B". See the picture below.



enter image description here



How do I fix this?



I think it must be a setting in a bashrc or bash_profile somewhere







share|improve this question






















  • This is yet another variant on unix.stackexchange.com/questions/418157 , unix.stackexchange.com/questions/248299 , and others.
    – JdeBP
    Mar 7 at 21:19












up vote
0
down vote

favorite









up vote
0
down vote

favorite











When I ssh into a particular server, I get a weird prefix that looks like a box with the characters 001B, and a "k" behind the vertical "0B". See the picture below.



enter image description here



How do I fix this?



I think it must be a setting in a bashrc or bash_profile somewhere







share|improve this question














When I ssh into a particular server, I get a weird prefix that looks like a box with the characters 001B, and a "k" behind the vertical "0B". See the picture below.



enter image description here



How do I fix this?



I think it must be a setting in a bashrc or bash_profile somewhere









share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 15:03

























asked Mar 7 at 14:19









R Dev

32




32











  • This is yet another variant on unix.stackexchange.com/questions/418157 , unix.stackexchange.com/questions/248299 , and others.
    – JdeBP
    Mar 7 at 21:19
















  • This is yet another variant on unix.stackexchange.com/questions/418157 , unix.stackexchange.com/questions/248299 , and others.
    – JdeBP
    Mar 7 at 21:19















This is yet another variant on unix.stackexchange.com/questions/418157 , unix.stackexchange.com/questions/248299 , and others.
– JdeBP
Mar 7 at 21:19




This is yet another variant on unix.stackexchange.com/questions/418157 , unix.stackexchange.com/questions/248299 , and others.
– JdeBP
Mar 7 at 21:19










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










0x001b is hexadecimal for the escape ASCII sequence. Your prompt contains one or several escape sequences that the terminal can not display. Make sure that your TERM variable is set correctly, or set a more sane primary prompt (PS1) in you shell startup script (probably ~/.bashrc if you're using bash).






share|improve this answer






















  • Thank you. The TERM variable was indeed the problem. For some reason it seems that "screen-256color" doesn't play nice with ssh. Are there any work-arounds? I like the coloring when I am not ssh'ing.
    – R Dev
    Mar 7 at 14:47











  • screen-256color is meant to be used in screen (GNU Screen). If you're not using screen, and you have a terminal that supports 256 colors, you could try xterm-256color, and if that looks weird too, you could try xterm-color. If your terminal isn't xterm-compatible, and you still want colors, you may be able to use the terminal definition for ansi (export TERM=ansi)
    – Tim Kennedy
    Mar 7 at 14:51






  • 1




    setting TERM=xterm-256color fixes the issue, as well as TERM=ansi. Both fixes work
    – R Dev
    Mar 7 at 14:55











  • @RDev toe -a (on Ubuntu at least) will list all supported terminals. Pick one that most closely resembles the one you are using. TimKennedy's suggestions seems sound to me.
    – Kusalananda
    Mar 7 at 14:55










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428757%2fweird-prefix-while-in-ssh%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










0x001b is hexadecimal for the escape ASCII sequence. Your prompt contains one or several escape sequences that the terminal can not display. Make sure that your TERM variable is set correctly, or set a more sane primary prompt (PS1) in you shell startup script (probably ~/.bashrc if you're using bash).






share|improve this answer






















  • Thank you. The TERM variable was indeed the problem. For some reason it seems that "screen-256color" doesn't play nice with ssh. Are there any work-arounds? I like the coloring when I am not ssh'ing.
    – R Dev
    Mar 7 at 14:47











  • screen-256color is meant to be used in screen (GNU Screen). If you're not using screen, and you have a terminal that supports 256 colors, you could try xterm-256color, and if that looks weird too, you could try xterm-color. If your terminal isn't xterm-compatible, and you still want colors, you may be able to use the terminal definition for ansi (export TERM=ansi)
    – Tim Kennedy
    Mar 7 at 14:51






  • 1




    setting TERM=xterm-256color fixes the issue, as well as TERM=ansi. Both fixes work
    – R Dev
    Mar 7 at 14:55











  • @RDev toe -a (on Ubuntu at least) will list all supported terminals. Pick one that most closely resembles the one you are using. TimKennedy's suggestions seems sound to me.
    – Kusalananda
    Mar 7 at 14:55














up vote
3
down vote



accepted










0x001b is hexadecimal for the escape ASCII sequence. Your prompt contains one or several escape sequences that the terminal can not display. Make sure that your TERM variable is set correctly, or set a more sane primary prompt (PS1) in you shell startup script (probably ~/.bashrc if you're using bash).






share|improve this answer






















  • Thank you. The TERM variable was indeed the problem. For some reason it seems that "screen-256color" doesn't play nice with ssh. Are there any work-arounds? I like the coloring when I am not ssh'ing.
    – R Dev
    Mar 7 at 14:47











  • screen-256color is meant to be used in screen (GNU Screen). If you're not using screen, and you have a terminal that supports 256 colors, you could try xterm-256color, and if that looks weird too, you could try xterm-color. If your terminal isn't xterm-compatible, and you still want colors, you may be able to use the terminal definition for ansi (export TERM=ansi)
    – Tim Kennedy
    Mar 7 at 14:51






  • 1




    setting TERM=xterm-256color fixes the issue, as well as TERM=ansi. Both fixes work
    – R Dev
    Mar 7 at 14:55











  • @RDev toe -a (on Ubuntu at least) will list all supported terminals. Pick one that most closely resembles the one you are using. TimKennedy's suggestions seems sound to me.
    – Kusalananda
    Mar 7 at 14:55












up vote
3
down vote



accepted







up vote
3
down vote



accepted






0x001b is hexadecimal for the escape ASCII sequence. Your prompt contains one or several escape sequences that the terminal can not display. Make sure that your TERM variable is set correctly, or set a more sane primary prompt (PS1) in you shell startup script (probably ~/.bashrc if you're using bash).






share|improve this answer














0x001b is hexadecimal for the escape ASCII sequence. Your prompt contains one or several escape sequences that the terminal can not display. Make sure that your TERM variable is set correctly, or set a more sane primary prompt (PS1) in you shell startup script (probably ~/.bashrc if you're using bash).







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 7 at 14:40

























answered Mar 7 at 14:26









Kusalananda

103k13202318




103k13202318











  • Thank you. The TERM variable was indeed the problem. For some reason it seems that "screen-256color" doesn't play nice with ssh. Are there any work-arounds? I like the coloring when I am not ssh'ing.
    – R Dev
    Mar 7 at 14:47











  • screen-256color is meant to be used in screen (GNU Screen). If you're not using screen, and you have a terminal that supports 256 colors, you could try xterm-256color, and if that looks weird too, you could try xterm-color. If your terminal isn't xterm-compatible, and you still want colors, you may be able to use the terminal definition for ansi (export TERM=ansi)
    – Tim Kennedy
    Mar 7 at 14:51






  • 1




    setting TERM=xterm-256color fixes the issue, as well as TERM=ansi. Both fixes work
    – R Dev
    Mar 7 at 14:55











  • @RDev toe -a (on Ubuntu at least) will list all supported terminals. Pick one that most closely resembles the one you are using. TimKennedy's suggestions seems sound to me.
    – Kusalananda
    Mar 7 at 14:55
















  • Thank you. The TERM variable was indeed the problem. For some reason it seems that "screen-256color" doesn't play nice with ssh. Are there any work-arounds? I like the coloring when I am not ssh'ing.
    – R Dev
    Mar 7 at 14:47











  • screen-256color is meant to be used in screen (GNU Screen). If you're not using screen, and you have a terminal that supports 256 colors, you could try xterm-256color, and if that looks weird too, you could try xterm-color. If your terminal isn't xterm-compatible, and you still want colors, you may be able to use the terminal definition for ansi (export TERM=ansi)
    – Tim Kennedy
    Mar 7 at 14:51






  • 1




    setting TERM=xterm-256color fixes the issue, as well as TERM=ansi. Both fixes work
    – R Dev
    Mar 7 at 14:55











  • @RDev toe -a (on Ubuntu at least) will list all supported terminals. Pick one that most closely resembles the one you are using. TimKennedy's suggestions seems sound to me.
    – Kusalananda
    Mar 7 at 14:55















Thank you. The TERM variable was indeed the problem. For some reason it seems that "screen-256color" doesn't play nice with ssh. Are there any work-arounds? I like the coloring when I am not ssh'ing.
– R Dev
Mar 7 at 14:47





Thank you. The TERM variable was indeed the problem. For some reason it seems that "screen-256color" doesn't play nice with ssh. Are there any work-arounds? I like the coloring when I am not ssh'ing.
– R Dev
Mar 7 at 14:47













screen-256color is meant to be used in screen (GNU Screen). If you're not using screen, and you have a terminal that supports 256 colors, you could try xterm-256color, and if that looks weird too, you could try xterm-color. If your terminal isn't xterm-compatible, and you still want colors, you may be able to use the terminal definition for ansi (export TERM=ansi)
– Tim Kennedy
Mar 7 at 14:51




screen-256color is meant to be used in screen (GNU Screen). If you're not using screen, and you have a terminal that supports 256 colors, you could try xterm-256color, and if that looks weird too, you could try xterm-color. If your terminal isn't xterm-compatible, and you still want colors, you may be able to use the terminal definition for ansi (export TERM=ansi)
– Tim Kennedy
Mar 7 at 14:51




1




1




setting TERM=xterm-256color fixes the issue, as well as TERM=ansi. Both fixes work
– R Dev
Mar 7 at 14:55





setting TERM=xterm-256color fixes the issue, as well as TERM=ansi. Both fixes work
– R Dev
Mar 7 at 14:55













@RDev toe -a (on Ubuntu at least) will list all supported terminals. Pick one that most closely resembles the one you are using. TimKennedy's suggestions seems sound to me.
– Kusalananda
Mar 7 at 14:55




@RDev toe -a (on Ubuntu at least) will list all supported terminals. Pick one that most closely resembles the one you are using. TimKennedy's suggestions seems sound to me.
– Kusalananda
Mar 7 at 14:55












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428757%2fweird-prefix-while-in-ssh%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)