Link to home
Start Free TrialLog in
Avatar of zenguru
zenguru

asked on

linux shell script to execute commands automatically each time system is rebooted

I set up rsa key pairs on my linux for ssh connection to remote server.
After this I had to run these commands:
nohup ssh-agent -s | grep -v echo > ~/.ssh-agent  
ssh-agent
ssh-add

each time I reboot the system.
What  commands do I need to so that above are executed automatically each time system is started?
Please clarify where so I enter the pass phrase ( assume pass phrase is 'monkey island' ).
Also let me know if it apply to any command or sequence of commands that I want to be executed on system startup?
I am using Fedora core 6.
ASKER CERTIFIED SOLUTION
Avatar of vrmuds1
vrmuds1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zenguru
zenguru

ASKER

Please provide complete script that include the necessary commands and where in that script I put the pass phrase for RSA 'monkey island'?
SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zenguru

ASKER

I dont know what you are saying but I am waiting for solution for the problem as posted.
I dont understand what do you mean by hard coding? I am asking for a script that runs each time system
starts so that I dont have to enter passphrase each time I do ssh operation. so any one with physical access to PC with gain acces to remote server provided they know the password of the user they login as. A blank keyphrase would be a security risk as any outsider (no access to PC) could try a blank phrase.