Archive for tag: ssh

Triggering Actions Like Sending a Mail on SSH Login

26 July, 2010 (06:30) | Linux, Mac OS X, ssh | By: Wolfgang

One way to trigger actions at an OpenSSH server login, is to use the sshrc file in your sshd configuration folder, usually /etc/ssh.

Use the following command in the sshrc file to send a mail:
mailx -s "$HOSTNAME Remote Login from $USER at `date`" mail@example.com

Of course every other command or notification method can be used too, ...

Connecting Through SSH SOCKS Proxy on Linux or Mac OS X

23 June, 2010 (06:30) | Miscellaneous, ssh, [English Posts] | By: Wolfgang

Problem
You work for a client that provides you with a connection to transfer files over SSH (SFTP). He wants to adjust the corporate firewall settings so that requests from your IP address don't get rejected. The problem is that you work from different places with different IP addresses. It would be time-consuming to add ...

Escaping Spaces in scp Commands

12 June, 2010 (06:30) | Linux, UNIX, [English Posts] | By: Wolfgang

Command line users know that the best way to deal with spaces in filenames is not to use them. If you still have to, it is necessary to escape the command arguments accordingly. Sometimes it might be enough to put quotes around the string, other times a backslash in front of every space character ...

Problems with VNC if Visual Effects are Enabled in Ubuntu

8 June, 2010 (06:30) | Linux, ssh, Ubuntu, [English Posts] | By: Wolfgang

Ubuntu's default VNC server vino seems to have serious problems if you connect to it with visual effects enabled on the machine. At least with my configuration it only updates the remote host user interface once. Then the remote machine still reacts to clicks but I can't see the effect of the click.

One pragmatic ...

Running Dropbox on Server without X11 or any other GUI

6 June, 2010 (06:30) | Linux, Mac OS X, [English Posts] | By: Wolfgang

Dropbox is a great way to keep data that need to be accessed on multiple hosts and/or multiple people in sync. If you have privacy concerns just use encrypted containers for you data.

One little disadvantage of Dropbox is, that it can't be accessed via WebDAV or even SSH. If you have a server with ...

Secure VNC from an iPhone/iPod touch/iPad (iTeleport vs. iSSH)

1 June, 2010 (06:30) | iPhone/iPod touch/iPad, [English Posts] | By: Wolfgang

Sometimes a SSH shell is not enough and you want to control a remote host the graphical way via VNC. For security reasons such connections should only be established over an SSH tunnel, especially if you are connecting from outside your own LAN.

Luckily enough, there are at least two applications capable of doing so ...

How to Control screen from Within Other screen Sessions

19 May, 2010 (23:22) | Linux, Mac OS X, screen, UNIX, [English Posts] | By: Wolfgang

Today a tip for all the GNU screen fans out there. It's really nothing special and the manpage readers might already know this but as I only figured this out lately I thought I would share it anyway:

By default control sequences in screen begin with C-a (pressing Ctrl and a at the same time). ...

Enabling Screen Sharing via SSH on Mac OS X

9 May, 2010 (22:30) | Mac OS X, ssh, [English Posts] | By: Wolfgang

Problem: You are working on a OS X machine via ssh and run into a situation where a VNC display of the remote host would be helpful. The only problem is that it has Screen Sharing disabled.

Solution: Just use the following command on the terminal:

sudo sh -c "/bin/echo -n enabled > /Library/Preferences/com.apple.ScreenSharing.launchd"

(I found this ...

SSH Public Key Authentication not Working

8 May, 2010 (23:05) | Linux, Mac OS X, [English Posts] | By: Wolfgang

You are trying to set up a public key authentication to a host and performed all the necessary tasks. You have checked your sshd configuration over and over again but it just doesn't work? Changes are that you forgot to set the right permissions of your authorized_keys file and/or your .ssh directory. In my ...