1

I am running a bash script that performs several git cloning operations in addition to some installations. When trying to clone, if the remote server does not have a password entered into it within a short time, it hangs up.

However, because some of the installs take so long I cannot (and probably should not have to) monitor the progress of the script, waiting for instances when 'git clone' requires a password. I want to be able to leave it running and any time is requires a password it continues to wait for a password without hanging up

My question is how can I increase time the remote end waits before hanging up? I am the owner of the remote server the git repo is on.

Note: I do not want to use passwordless SSH or similar.

Shears
  • 1,539
  • 2
  • 11
  • 6
  • Can’t you ask for the passwords first and store them until you need them? – poke Jul 19 '12 at 21:16
  • Thanks,I could. That would probably solve the problem for this script but I am pretty curious if it possible to actually increase the time before the remote end 'hangs up'. – Shears Jul 19 '12 at 22:40

1 Answers1

1

Instead of going through the password based approach I would recommend to setup SSH key based authentication, so you will have no wait at all.

How to generate public SSH keys

Hope that helps

Community
  • 1
  • 1
Eugene Sajine
  • 8,104
  • 3
  • 23
  • 28
  • Thanks. Par my understanding, this is pretty much passwordless ssh logging in which I want to avoid. If I do that, anyone attempting to use the script would need to setup public ssh keys in the server holding the git repo. I am trying to automate it as much as possible. What poke suggested about storing passwords will probably do the trick for the script I am writing but I am pretty curious if it's possible to actually increase the time before the remote end 'hangs up'. – Shears Jul 19 '12 at 22:39
  • What is your set up? Are you inside a friendly network? If yes, then you could setup SSH for one user "scriptrunner" or whatever and then if you want other people to use the script they could login as scriptrunner enter password only for that user and trigger the script. Another way could be to remove authentication from git clone, but leave it on SSH level. I.e. ssh login will wait for the password, instead of git clone. Then as i understand timeout is not going to affect you. – Eugene Sajine Jul 20 '12 at 17:50