I'm trying to log into a remote server and get the uname every 5 minutes. However, I can't get it work. Here is what I attempted
[cd@localhost ~]$ ssh -T [email protected] uname;sleep 2;uname
[email protected]'s password:
FreeBSD
Linux
[cd@localhost ~]$
One the first pass, I get 'FreeBSD', which is the remote servers uname. However, on the second pass I get 'Linux', which is my local host and not the remote host. Can I pass some kind of crude loop construct at the ssh command line?