How can i create a script that will ssh a device and type some commands?

Hi Guys,
this is the scenario:
ubuntu pc and I have 10 wireless devices that I need to check their firmware version.
I would like to create a script that it will ask me IP, after I enter it, I hit enter then it will show me the version of the firmware.

this is what i do.

ssh admin@10.0.0.10
admin
admin
show device

The wireless box I use it is not a linux box it has it's commands.

thank you in advance for your help

I don't understand that script, particularly the 'admin' 'admin' part. Are you ssh-ing into a shell or not?

I am using open ssh for windows.

here it is manual example of what i have to type in order to get the info i need

C:\Users\Gabriel\Desktop\test>ssh admin@192.168.0.5
      0 [main] ssh 12156 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
admin@192.168.0.5's password:

admin connected from 192.168.10.23 using ssh on BreezeWAY
BreezeWay2020> show device
device general product-type COMPACT
device general product-subtype EPC
device general compact-model-type BreezeWAY2020L
device inventory hw-ver 000-03-00
device inventory main-sw-ver 0606.001729
device inventory backup-sw-ver 0606.001607
device inventory running-sw MainSW
device inventory boot-ver 2014.07.00077
device inventory up-time 1970-01-01T00:00:00-00:00
[ok][1970-01-12 23:51:42]
BreezeWay2020>
*** IDLE TIMEOUT ***
Connection to 192.168.0.5 closed.

C:\Users\Gabriel\Desktop\test>

So, not a shell.

Can you tell me if this works?

ssh admin@192.168.0.5 "SHOW DEVICE"

It should still ask you for a password.

I know it's not what you want, I'm still exploring what we're dealing with here.

Do you have any file access to these wireless devices?

I just tried what you said and it never got the prompt to keep typing
I have to press CTRL+C to abort

---------- Post updated at 12:38 PM ---------- Previous update was at 12:36 PM ----------

that is all the access customer have to this kind of devices

That is unfortunate. With no way to copy SSH keys to these devices, you'll have to use something like the expect brute-forcing tool to automate them.

Do you really need to use ssh ? Some of those devices also accept telnet , and it seems to be used on LAN only.

it kinda works like that but it wont let me to add any other command later
sshpass -padmin ssh -o StrictHostKeyChecking=no user@10.0.0.10

sshpass is very insecure, but given there's no way to use keys there's no securer alternatives.

sshpass -padmin ssh -o StrictHostKeyChecking=no user@10.0.0.10 <<EOF
command
EOF

Do not indent the ending EOF.