Hi All,
Need to connect to target host and execute a command and connect back to source host to continue with next set of command execution.
Is there a utility/command using which we can connect to target host ?
Please suggest.
Note: Netezza database is instaled on Linux server.
Thanks and Regards
Nagaraja Akkivalli
perhaps you can use expect script
You can use SSH to do this
Syntax:
sshusername@ipaddress �command�
ssh username@domainname �command�
ssh username@domainname �command1 | command2
Examples
ssh tts@192.168.1.9 �df -Th�
ssh tts@192.168.1.9 �ls -l /etc/httpd�
ssh tts@192.168.1.9 �grep -i tts /etc/passwd�
Add the single line command in the script to execute a command in the remote machine.
1 Like
Thanks for your reply!!
I was able to achieve it using ssh command in quotes as you suggested.