Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A more secure way' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A more secure way
Authored by: John Kiniston on Dec 01, '03 04:29:35PM

A better way to do this would be with SSH.

Instead of enabling your faux Gopher server and allowing anyone to pop your mail for you use ssh to run your command securely.

Change the
| wget -T 5 -q http://your-home-ip:70/

line to

| ssh -i mail.key your_username@your-home-ip /Users/your_username/bin/checkmail

Enable Remote Login on your Macintosh.

Create a special SSH key you will only use for this application with no password with:

ssh-keygen -f mail.key -t dsa

upload the mail.key file to your server

Edit or create a ~/.ssh/authorized_keys file on your local machine

Insert the contents of the mail.key.pub file as the first line of the file after the following text

no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command="~/bin/checkmail"

The file should then look like this:

no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command="~/bin/checkmail" sh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAxfz84hkjhasjfgu+M4mcnCysP6G5Ihe6YCmT9URgwgbdjiU1ijY1O7zsQPvx0Q9802D4k5NuIRQjyrZBMSOPJMkAS3JK3oaU6ZdtwFOJbah8iVwFWT/OKivAz6gGFkhEZt85WmqTxQAmJepHJLKJHq9QfuLssbd1i0ZHx6r/80c6OvfM/01LXU= your_username@JMacintosh.local


Please note the above text may wrap in places where it should be a single line.



[ Reply to This | # ]