ooobooontooo
June 7th, 2009, 09:22 PM
Hi,
I plan to run a server at home and connect to it from other places when I'm not around. Unfortunately, my home network is behind a NAT so it's not so easy to login (I also do not wish to get involved with 3rd party websites like dyndns). So, what I've set up to do is automate wakeup on my server every day use anacron to copy the exterior ip of my server to another server (with a static ip) that I trust. Unfortunately, I haven't actually tested this yet...and there are some questions that I had.
1. I'm using a rsa key with no password to automate the scp transaction (I may use the expect script later, but for now I'm just trying to get it work). Because I use anacron which is run by root, do I put the private key in the root directory or the user directory?
2. After I update my external ip address, I want my server at home to power down. For this I can use cron, and I wish to use the UTC standard to automate its shutting down. Is adding TZ=UTC in /etc/init.d/cron enough? (TZ wasn't defined in the cron environment to begin with...)
3. As I said before I copy the ip address to a server that I trust. However, I don't trust them completely. I know that anacron is run as root, so does that mean everything in the script that I wrote is run as root? If so, because I do some sshing and scping, is that unsafe? Should I try get the script to run as a user instead? ...How would I go about doing that?
Thanks for reading up til now and thanks in advance to answers.
I plan to run a server at home and connect to it from other places when I'm not around. Unfortunately, my home network is behind a NAT so it's not so easy to login (I also do not wish to get involved with 3rd party websites like dyndns). So, what I've set up to do is automate wakeup on my server every day use anacron to copy the exterior ip of my server to another server (with a static ip) that I trust. Unfortunately, I haven't actually tested this yet...and there are some questions that I had.
1. I'm using a rsa key with no password to automate the scp transaction (I may use the expect script later, but for now I'm just trying to get it work). Because I use anacron which is run by root, do I put the private key in the root directory or the user directory?
2. After I update my external ip address, I want my server at home to power down. For this I can use cron, and I wish to use the UTC standard to automate its shutting down. Is adding TZ=UTC in /etc/init.d/cron enough? (TZ wasn't defined in the cron environment to begin with...)
3. As I said before I copy the ip address to a server that I trust. However, I don't trust them completely. I know that anacron is run as root, so does that mean everything in the script that I wrote is run as root? If so, because I do some sshing and scping, is that unsafe? Should I try get the script to run as a user instead? ...How would I go about doing that?
Thanks for reading up til now and thanks in advance to answers.