I'm trying to login into multiple servers and execute the following command:
arp -an|grep lanx>lanx
I'm using this method:
ssh [email protected] arp\ -an|grep\ lanx >lanx
but it is not working its giving me an error
I'm trying to login into multiple servers and execute the following command:
arp -an|grep lanx>lanx
I'm using this method:
ssh [email protected] arp\ -an|grep\ lanx >lanx
but it is not working its giving me an error
ideally just put the commands in quotes like this:
ssh [email protected] '/sbin/arp -an | grep lanx' > lanx
or
ssh [email protected] '/sbin/arp -an' | grep lanx > lanx
The other problem might be the user admin on your machine does not have arp in PATH (is he root? arp is usually in /sbin/ and /sbin/ is usually not in PATH of a regular user.
ssh [email protected] 'arp -an|grep lanx' > lanx.