Advertisement
Guest User

Untitled

a guest
Apr 5th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. function GetRemoteLinuxIp(hostAddress) {
  2. console.log(hostAddress);
  3.  
  4. exec("ifconfig -a | tr -s ' ' | awk -F'[: ]' ' {if (/^[a-z]/) printf $1 " "} {if (/inet addr:/) print $4 }' ", {
  5. user: 'user',
  6. host: hostAddress,
  7. password: 'password'
  8. }).pipe(process.stdout)
  9. };
  10.  
  11. enp0s3 192.168.1.8
  12. enp0s3 192.168.1.9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement