garbled text in SSH

Red Squirrel

No Lifer
May 24, 2003
70,199
13,583
126
www.anyf.ca
Is there a way to fix text like this?

uocli.cpp: In function âint main()â:
uocli.cpp:18: error: no match for âoperator+â in â128 + ForceSize(std::string, int)(20)â


It throws in garbage characters and makes stuff really hard to read. This happens with various things such as man pages, error outputs, etc. I've tried with various SSH clients, so don't think it's that.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I donno.

Looks like a problem with the 'locale' settings. With modern Linux and assuming your american then everything should just be 'en_US.UTF-8' encoding. Make sure your clients support UTF encoding and your using a decent font.

echo $LANG

What OSes and such are we dealing with here? Windows to Linux? Debian? Fedora?

Your not giving us much to work with here.
 

Red Squirrel

No Lifer
May 24, 2003
70,199
13,583
126
www.anyf.ca
Server is FC6, client is windows XP. The SSH client is called "SSH Secure Shell". I'm Canadian, tried various encodings including UTF-8 to no avail. I have a feeling its server side. Would posting my sshd config help? or would this be somewhere else?
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
try using the putty client to start with.

If you see these issues on the local console?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Ya 'locale' is set server-side.

Check out $LANG or $LC_ALL and see if they are set to something weird. You can adjust this in your ~/.bash_profile or ~/.bashrc files.

This is just realy a guess on my part as I've not run into these problems.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Try ISO-8859 and see what it gets you.


en_US.UTF-8 is technically correct, but maybe Window's UTF support or your fonts aren't working out well with it for some strange reason.

edit:
actually try en_US

Without the .UTF-8 part.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The easiest thing to try is 'LANG=C command" and see what the output looks like.
 

Red Squirrel

No Lifer
May 24, 2003
70,199
13,583
126
www.anyf.ca
I tried in putty again just to be extra sure, and guess first time I tried the setting for utf-8 did not go through. I can now confirm it actually *IS* client side. I like the other client I use because it has the sftp option which I use a lot since its actually faster than smb to transfer large files, but it has no option anywhere to set to utf-8, that I know of. Anyone know of any other SSH clients that have the built in sFTP?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I don't know of anything else that supports sftp. Putty.exe has some companion programs that can do sftp from the command line, but that's about it.


There are a few ftp programs that support ssh sftp stuff in a similar manner that they support ftp. One example that I know about is Filezilla. It'll do sftp and it's a decent graphical application.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,633
4,562
75
It sounds like your SSH server is trying to send text formatting information (boldness, color, etc.), and your client doesn't understand that. Unfortunately, I don't know the name of that "formatting information", so I can't Google it, and I have no idea how to stop it.

Wish I could be more helpful. :(
 

Red Squirrel

No Lifer
May 24, 2003
70,199
13,583
126
www.anyf.ca
I've switched to putty for now. I don't use sftp THAT often, so I can live without it. For remote logins I already do use putty off my USB key and usually tunnel a RDP connection to a VM I have, and I can do any remote file transfers through that. SSH tunnels are FTW.
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
there is a putty companion sftp that will load keys from your putty agent that works pretty good.

ssh tunnels are nice, and sftp is nice. What I really love is the switch off of windows. All the linux stuff supports sftp natively so I can just type ssh://user@server:/file/system and have it work. Even better is ssh config file, so then it's just ssh://server (I use non standard ports for 90% of my machines, and it can be a bit more difficult)
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Yep.

To mount a directory through sftp in Linux you have to install the fuse-based sshfs.

In Debian:
sudo apt-get install sshfs
sudo addgroup username fuse


Then you can go:

sshfs remote.machine:/home/username /home/username/remote

 

ryankun

Junior Member
Jun 22, 2012
1
0
0
I had this exact same problem.

In my case, it turned out that installing Git resulted in Git updated the SVN_SSH to
Code:
"C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe"
, since it wants to rely on the SSH profile I had set up with TortoiseSVN.

As is pointed out over in this helpful explanation, however, this variable needs to have escaped slashes to work properly:

Code:
"C:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe"

Without the spaced slashes, you get the garbled text. (I don't think this has anything to do with your Russian locale, though my locale is in Japanese, so it's hard to be sure :| .)
 

VinDSL

Diamond Member
Apr 11, 2006
4,869
1
81
www.lenon.com
Looks like I'm 5 years late to the party... :sneaky:

Anyone know of any other SSH clients that have the built in sFTP?
On winders machines, I use WinSCP.


On Linux machines, I use Nautilus:


I've switched to putty for now.
WinSCP is based on PuTTY - essentially a GUI front-end for PuTTY.

You can even bring up PuTTY in a terminal window, if you need to use CLI.
 
Last edited:

dtdionne

Junior Member
Aug 8, 2012
1
0
0
I know it's an old thread but I had the same issue and this worked wonderfully for me...and it was very quick and easy. Thanks Nothinman

The easiest thing to try is 'LANG=C command" and see what the output looks like.

I'm severly anal about my ssh client and the very best one I've ever used and still use is SecureCRT...it does SOCKS5 flawlessly and it's MINDBLOWING!!!!

I had a client with ~2500 linux boxes behind a jumpbox. Of course tunneling worked great for direct connectivity to each of the 2500 servers but maintaing all those tunnels in the jumpbox's ssh profile was impossible.

With SecureCRT you setup the jumpbox as a SOCKS5 firewall with dynamic port forwarding and call it Jumpbox. Then whenever you create a new ssh profile there's a dropdown for firewalls, if the box your setting up this new profile for is behind that jumpbox, just choose "Jumpbox" from the drop down and THATS IT.