I want to make a simple script that will log onto all 5 servers and do "who" so I can see whos on and be able to "sendnote".
Here is my script:
#!/bin/sh
while read ServerName
do
ssh user@$ServerName "who" > $ServerName.txt
done < inputer.txt
It just hangs there and then when I press enter I get Error:
ssh: connect to host port 22: connection refused
Any ideas?
Here is my script:
#!/bin/sh
while read ServerName
do
ssh user@$ServerName "who" > $ServerName.txt
done < inputer.txt
It just hangs there and then when I press enter I get Error:
ssh: connect to host port 22: connection refused
Any ideas?