SSH for longer than 30 minutes?


#1

I had a really nasty test failure that only happened on CI and only when running full test suite (it worked locally or when running just one test on CI via ssh), so by the time I sshed and did rescue rspec etc. ssh would close on me.
(it was some capybara chrome related)

I ended up giving up on that test and replacing it with something less exhaustive but more reliable, but in case I run into similar issues in the future, is there any way or hack to get access to VM for more than 30 minutes?


SSH into a build for more than 30 minutes?
#2

I wish there was a nice UI for extending the time that an SSH connections keeps alive, but in the meantime, I’m using a fab command like this:

@task
def keep_circleci_alive(minutes=30):
    minutes = int(minutes)
    print('Keeping CircleCI alive for {} minutes.'.format(minutes))
    for i in range(1, minutes + 1):
        print(i)
        time.sleep(60)

It needs to print something every once in a while since circleci will abort the command if it doesn’t print anything for 10 minutes.


#3