Big shocker - I'm a heterogeneous kind of guy.
While I prefer Linux, I also have OSX boxes - and sometimes the odd Windows machine will show up on my LAN. I want to share files across these machines. You'd suggest SMB right (or File Sharing in Apple parlance)?
Wrong.
For a long time, File Sharing (SMB or AFP) was a hit and miss type of service on every OSX machine I used. Most of the time it worked - and then it doesn't, and you hunt around for a cause, trying various actions to fix the issue that strangely appeared without any changes to the machine. It was frustrating. (and no, it wasn't just user error! lol)
Then the fix hit me one day - SFTP!
And I've never been happier. (and the bonus, all my communications are encrypted!)
On your OSX box, head to System Preferences -> Sharing -> disable File Sharing and enable Remote Login. Chose who to allow onto your box.
You may not know it - but your life just got easier (and less frustrating).
Connecting to that machine from various other machines will now be dependable and consistent. You can use, from your command line, sftp, ssh, scp (and probably others). For GUI clients, there are too many to list - from Dophin on KDE, to ForkLift on OSX.
The biggest negative to this solution is that the default Connect to Server on OSX won't (natively) support SSH, neither does Windows. There are ways to make me into a liar though - and I encourage you to check these out.
While describing OpenSSH is out of scope for this post - configuring this tool correctly will allow for a secure and simpler authentication experience.
Thursday, 27 March 2014
Sunday, 23 March 2014
Speed Up Your Browsing with Profile-Sync-Daemon
What if I told you that you could greatly speed up your browser while reducing the physical wear on your hard drive? You'd call me a daft bugger I'd bet! :-)
I found this application some weeks ago and recommend it, profile-sync-daemon on the AUR. It symlinks your browser profile to /tmp which is a tmpfs (running in RAM), so the large amount of disk I/O that it generates is now in RAM rather than on your disk. This is great for HDD as well as SSD - with speed increases up to six times taster. It supports a wide range of browsers including:
Very easy to install, just edit (as root).
I found this application some weeks ago and recommend it, profile-sync-daemon on the AUR. It symlinks your browser profile to /tmp which is a tmpfs (running in RAM), so the large amount of disk I/O that it generates is now in RAM rather than on your disk. This is great for HDD as well as SSD - with speed increases up to six times taster. It supports a wide range of browsers including:
- Chromium
- Firefox
- Google Chome
- Midori
- Opera
Very easy to install, just edit (as root).
/etc/psd.conf
USERS="jeff"
systemctl enable psd
systemctl start psd
profile-sync-daemon parse
Saturday, 15 March 2014
Changing the Default Port for OpenSSH on Arch Linux
When I had public servers with port 22 (OpenSSH) open, they got scanned daily. When I changed the port to a non-standard one the majority of my problems went away.
While security by obscurity is simply not a secure enough option, it certainly reduced the number of log entries I had to review daily when it got rid of the script kiddies.
I'll refer to my favourite distribution Arch Linux for this post - but the majority of this can be used on many Linux flavours.
Changing the default port of OpenSSH is very easy. First select a higher range port to use, I'll use 22022 for my example. Check that the port you chose is not being used by anything with the following command (nothing returned is good).
Now edit (as root) /etc/ssh/sshd_config and enter your port.
Finally restart your service (as root).
Excellent. Now test it with something like.
While security by obscurity is simply not a secure enough option, it certainly reduced the number of log entries I had to review daily when it got rid of the script kiddies.
I'll refer to my favourite distribution Arch Linux for this post - but the majority of this can be used on many Linux flavours.
Changing the default port of OpenSSH is very easy. First select a higher range port to use, I'll use 22022 for my example. Check that the port you chose is not being used by anything with the following command (nothing returned is good).
grep 22022 /etc/services
Now edit (as root) /etc/ssh/sshd_config and enter your port.
Port 22022
Finally restart your service (as root).
systemctl restart sshd.service
Excellent. Now test it with something like.
ssh -p 22022 jeff@localhost
Wednesday, 12 March 2014
Cleaning Arch Linux
Keeping your Arch Linux machine in top condition doesn't just mean you do pacman updates, it should also mean you keep your local repository optimized. I found great threads on the topic, putting together the wisdom of others into a short script I run interactive daily.
Tuesday, 11 March 2014
Speed Up Mission Control Animations
While I love virtual desktops, in general, I found Mission Control in OSX Mavericks to be frustrating. You may think that the lack of cube animation or the fact that only horizontal desktops are supported, to be my largest complaint, but you would be wrong. Its the animation, the lag when you mouseover the virtual desktops or to add a new desktop. I found a little fix that will speed this up on OSX, making virtual desktops again usable.
Saturday, 8 March 2014
Testing if an Application Exists in Bash
Some of my Bash scripts need to be used on various systems I use. It is very common to call other command line tools that do some job or another, from these scripts. Sometimes I am forgetful (big surprise!) and forget to install these required applications.
So I use a simple function to check that these other applications exist, returning true or false.
Now you use the function, placing your call below the code above. This example exits the script if the application is not found.
So I use a simple function to check that these other applications exist, returning true or false.
Now you use the function, placing your call below the code above. This example exits the script if the application is not found.
Thursday, 6 March 2014
KDE Password & User Account System Settings 'Freezing'
If, like me, you install KDE on Arch Linux and when editing your Password & User Account in System Settings it to freezes, then you need to do the following.
You need to change the default behaviour of chfn by changing the following line in /etc/login.defs.
Change the value to frwh so it looks like this.
That worked for me - but let me know if you still have a issue since I'm not convinced? I could not find the fix on any official site, though it has happened to me on each of my installs (maybe because I consistently change the same fields).
You need to change the default behaviour of chfn by changing the following line in /etc/login.defs.
CHFN_RESTRICT rwh
Change the value to frwh so it looks like this.
CHFN_RESTRICT frwh
That worked for me - but let me know if you still have a issue since I'm not convinced? I could not find the fix on any official site, though it has happened to me on each of my installs (maybe because I consistently change the same fields).
Subscribe to:
Posts (Atom)