11.13.08
Posted in Mac, Linux at 3:12 pm by Michael
Ran into a problem today with mounting a dmg file from mac os on my linux machine. Apparently some dmg files are compressed so you can’t just mount it normally. You need a utilty called dmg2img which will decompress the dmg file and allow you to mount it normally on the loopback.
You can get dmg2img here.
You’ll have to compile and install it, then you can run it like this:
dmg2img -i filename.dmg -o filename.out.dmg
Then you’ll be able to mount it normally on the loopback like this:
mount -t hfsplus -o loop /path/to/filename.out.dmg /path/to/mountpoint
Hopefully this will help someone who has the same issue I did with mounting a compressed dmg file from Mac OS X
Permalink
08.25.07
Posted in Ubuntu, Linux at 2:00 am by Michael
If you’re like me you use ssh quite a bit throughout your day. I have had problems with ssh timing out on me after just 5 or 10 minutes for a long time now. I recently got fed up with it and decided to find a solution. It turns out that the problem wasn’t really ssh or even the shell. The problem was router NAT tables. You see most routers will close an idle connection that is being translated to save space in the tables. Normally I would say this is great, but for ssh, where sometimes I will leave it logged in yet idle, this was frustrating. I did some searching and found an option that made this problem go away.
All you have to do is simply edit the file /etc/ssh/sshd_config and add 1 line:
ClientAliveInterval 300
That’s it. Add that line to the bottom of your sshd_config file, save it, and then restart ssh. This option will cause sshd to send a keepalive across an idle connection every 5 minutes. This prevents the router from timing out the NAT connection, and you can happily idle as long as you need to. This option should be used with care, it’s never a good idea to leave a login session open on a computer that is not secure. As long as you aren’t lazy and leave your computer unattended where someone could use your session, you should be safe. Never, ever, ever leave yourself logged in as root on a server for longer than absolutely necessary. This is just plain common sense, but I can’t stress it enough. I have seen too many “pranks” played on people who did this out of pure laziness. Whenever you are using root, do what you have to do and exit the shell. If you want to stay idle, do it as an unprivileged user.
Having ssh timeout when you are not quite done working but still idle for whatever reason can be really annoying. This small fix should make things much more bearable for people that work like I do. I’m glad I finally took the time to research this issue, and I share it here so that others can learn from my discoveries. Enjoy.
Permalink