Run local script on remote host via SSH

 

ssh root@<remoteServer> "bash -s" < /opt/script.sh
Run in multiple hosts: 
for i in `cat hosts.txt` ; do echo $i && ssh root@$i "bash -s" < script.sh ; done 

Source: https://unix.stackexchange.com/questions/87405/how-can-i-execute-local-script-on-remote-machine-and-include-arguments

Get remote logged user

 wmic /node:(hostname ou IP) computersystem get username

 

C:\Users\douglastos>wmic /node:desk0191 computersystem get username
UserName
grupo\userteste

 

Mobile Access SSL Network Extender (SNX) remote users with Windows 11 24H2 fail to connect

  Cause The conflict resolution mechanism in Windows 11 24H2 is different than in earlier versions of Windows. Solution On the Windows endpo...

Mais vistos