Results 1 to 4 of 4

Thread: cron ssh reverse tunnel

  1. #1
    Join Date
    Feb 2010
    Beans
    2

    cron ssh reverse tunnel

    Hi,

    I am trying to access my work PC (Ubuntu 9.04) from home. I do not have control over the router/firewall at work. I am able to establish a reverse ssh tunnel from my work pc to my home PC while i am at work and then use this connection to vnc from home. however i am not able to run the ssh command thru cron so that the ssh tunnel can be created automatically. I have searched the net and tried the solutions provided but they dont seem to work. the ssh command executes thru terminal but does not work thru cron. after some debugging i am getting the error "Host key verification failed"

    can somebody please help me

    Thanks in advance

  2. #2
    Join Date
    May 2008
    Beans
    Hidden!

    Re: cron ssh reverse tunnel

    Quote Originally Posted by amanik View Post
    Hi,

    I am trying to access my work PC (Ubuntu 9.04) from home. I do not have control over the router/firewall at work. I am able to establish a reverse ssh tunnel from my work pc to my home PC while i am at work and then use this connection to vnc from home. however i am not able to run the ssh command thru cron so that the ssh tunnel can be created automatically. I have searched the net and tried the solutions provided but they dont seem to work. the ssh command executes thru terminal but does not work thru cron. after some debugging i am getting the error "Host key verification failed"

    can somebody please help me

    Thanks in advance
    If you truly need to access your work computer, your immediate supervisor would be the one to ask. If you're accessing company resources from outside the company without company permission, you're just asking to be fired.

  3. #3
    Join Date
    Oct 2008
    Beans
    4

    Re: cron ssh reverse tunnel

    config SSH with [StrictHostKeyChecking=no] option. usually it's in /etc/ssh
    however this maay make your PC vulnerble.

  4. #4
    Join Date
    Feb 2010
    Beans
    2

    Re: cron ssh reverse tunnel

    Hi,

    Thanks tried that the error has stopped coming however ssh tunnel is not forming below is my crontab entry

    */1 * * * * /usr/bin/ssh -i /home/USERNAME/.ssh/id_rsa USERNAME@URL >> /home/USERNAME/ssh.log 2>&1
    appreciate your help

    thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •