SSH and scripting
I need a little help with ssh-agent and a simple script:
code: ___________________________________________ eval 'ssh-agent $SHELL' ssh-add sftp -b batch user@server eval 'ssh-agent $SHELL -k' --------------------------------------------------------------------- It works but gives the output: bash-2.05$ exit (i then enter 'exit') exit Need passphrase for /home/user/.ssh/identity Enter passphrase for /home/user/.ssh/identity Identity added: /home/user/.ssh/identity (/home/user/.ssh/identity) bash-2.05$ exit(entered exit again) exit how do i script the batch so that i don't have to enter exit. |
Try putting "exit" in a line at the end of your code.
|
oK CEWL, where do i script to create a costom login message for the current user
|
you can do that in two ways, 1 there is the /etc/motd file and 2 there is a directive in sshd_config called banner, where you point to a file containing a welcome banner or something.
|
If it is different messages then you can edit /etc/basrc and get it to display an individual message per user too.
|
All times are GMT -5. The time now is 08:18 PM. |