Bash Script Automate Login xfreerdp
by A-Okay from LinuxQuestions.org on (#5MEKB)
Hi,
I would like to create a bash script. I need a little help, I have no idea how I could create it.
Situation: I have a .txt file with 3 IPs. Every IP is running RDP service under Windows. I'm going to connect to them with "xfreerdp /f /u:USERNAME /p:PASSWORD /v:HOST:[3389]" from my linux machine.
What i'd like to do:
A script, that is going to read the first IP in the .txt file and puts it into the xfreerdp command and connects to it automatically. (The credentials don't change, they are for all IPs the same). This, one after another, for each IP in the .txt file. The xfreerdp command takes the first IP out of the .txt file and tries to connect with it, next by next. If the connection with the first IP was successfull or not (doesn't mather if successful) it is going to the next IP and tries to connect with it and so on. I hope, I was able to explain, what I would like to do. Please ask me, if you need more information. Thank you very much and best regards.
I would like to create a bash script. I need a little help, I have no idea how I could create it.
Situation: I have a .txt file with 3 IPs. Every IP is running RDP service under Windows. I'm going to connect to them with "xfreerdp /f /u:USERNAME /p:PASSWORD /v:HOST:[3389]" from my linux machine.
What i'd like to do:
A script, that is going to read the first IP in the .txt file and puts it into the xfreerdp command and connects to it automatically. (The credentials don't change, they are for all IPs the same). This, one after another, for each IP in the .txt file. The xfreerdp command takes the first IP out of the .txt file and tries to connect with it, next by next. If the connection with the first IP was successfull or not (doesn't mather if successful) it is going to the next IP and tries to connect with it and so on. I hope, I was able to explain, what I would like to do. Please ask me, if you need more information. Thank you very much and best regards.