_/Short answer :/_ whoami/_
_//_Long Answer :_/once you login your name is returned by this command,
use this as a variable $(whoami)
_/EXTRA :/_  btw ~ is your home directory if you need that too

On 11/30/2012 12:00 PM, Devendra Gupta wrote:
> I have a shell script in which I am doing ssh to several other machies
> but the problem is that the hosts require to add a key in the script
> invoking machine.. to resolve it I added a swith "-o
> StrichHostKeyChecking=no" and now its not asking to add key. But
> another thing I need to automate is that passing username password for
> remote host in the same script so that I do not need to enter it
> manually. Please suggest me a way, help guidance would be highly
> appreciated.
>
> -Devendra
> -- 
> Mailing list guidelines and other related articles:
> http://lug-iitd.org/Footer

-- 
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer

Reply via email to