SSH Escape Characters

I am sure a LOT of people reading this blog use ssh in their everyday work/life/etc. I am not sure though how many of you have heard of ssh EscapeChar unless you’ve read the ssh_config file (and even if you have done so, did you pay any attention to it ?). So what can you do with EscapeChar ? not a lot, but certainly very usefull stuff.

My most frequent problem with ssh is sessions that sometimes they don’t end as they are supposed to. You logout from the remote system and you never get a prompt on yours because something has stuck somewhere, sometime. Wouldn’t you wish there was an escape sequence to end this suffering, like telnet’s ctrl+] ? Well there is! Just edit your client’s ssh config file (/etc/ssh/ssh_config for gentoo) and add to the end:
EscapeChar ~

now try ssh to a host and when you are in, try this: ~?. You will see a list of helpfull options. The solution to the previous described problem of stale connections is ~.
Dummy-safe: So to get it to escape press[alt gr] + [~] two times and then [.]
If that doesn’t work, try pushing Enter before “~”.

What’s also very helpfull is the ability to start/end portforwarding during an active ssh session! Say you have opened an ssh connection to a host and you now have to portforward a port, what do you do ? New ssh connection with -L/-R options ? nope! You just press ~C and do what you want from the ssh “command shell”.

enjoy!

mplayer headaches with alsa solved (hopefully)

Lately I had a problem with my gentoo. I could not get HR video files with mplayer to work smoothly. In order to test what was going on I downloaded ExperienceMP10_1280x720_8mbps.wmv from http://www.wmvhd.com/ .

Whenever I tried playing it the result was choppy video and sound. Mplayer gave me a banner that said: Your system is too SLOW to play this!. Hey my pc is based on an Athlon XP 2800+! It’s NOT slow! So the problem was surely not cpu power. I tried playing around with mplayers’ -vo options. In fact -vo gl gave me some more fps…but it was still unwatchable. Then it was time to play aroung with -ao options. I tried them all… alsa, oss, sdl, alsa:mmap, alsa:noblock, nothing…each one was worse than the other. Then I tried -ao null. And what a surprise…when audio was disabled video stopped being choppy. It was playing just fine! So the problem was surely audio related. I have the latest alsa installed from portage and other programs play really ok with it, so I thought maybe there a newer mplayer version could do the trick. I first checked on gentoo forums where I found this very helpfull thread about multimedia overlay in portage. I installed it in my portage overlay dir, unmerged mplayer from normal portage tree and emerged mplayer-cvs from the new overlay. After some compile time it was finally ready. The results ? amazing 🙂
It works with every video format I’ve tried! No sloppy playback, no lagging sound, just perfect.

I hate using custom solutions and ebuilds to cure my problems, but at least I have not compiled anything by “./configure;make;make install” yet. Long live the gentoo community. Thnx a lot to all 🙂