Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How can i create a script that will ssh a device and type some commands? Post 302986830 by gabak on Wednesday 30th of November 2016 11:22:22 AM
Old 11-30-2016
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.

Code:
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



Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 11-30-2016 at 12:35 PM.. Reason: Added CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Modifying simple commands to create a script

Can anyone direct me to a resource that explains scripting in simple terms? I have visited many sites and browsed this forum and have yet to find simple explanations. (8 Replies)
Discussion started by: rocinante
8 Replies

2. Shell Programming and Scripting

Adding ssh commands to a shell script

I have written some scripts that do a few admin tasks on 23 servers I manage. Usually I execute these scripts from one server by running ssh commands remotley, i.e. ssh root@server2 shellscript, ssh root@server2 shellscript & so on.. It works fine but I want to improve this by writing a... (3 Replies)
Discussion started by: Moxy
3 Replies

3. Shell Programming and Scripting

Using tab in script to create file of commands

from CLI pressing Tab and character like a shows result of the commands starting with a, can i use this in a script too and post the results to a file? thanks (1 Reply)
Discussion started by: tvrman
1 Replies

4. Shell Programming and Scripting

to create a phone book using shell script and unix commands

can you help me to create a phone book with add, delete, modify with first name, last name, middle name, phone no(multiple ph no), address, email address, notes or comments to store about the contact and groups that hold for the contact.. i am new to this linux environment. please guide me. ... (1 Reply)
Discussion started by: monster11209
1 Replies

5. Shell Programming and Scripting

Create a list of commands in a central location, and then run them all remotely through a ssh here

I'm trying to write a script that in the end will from one central location hop to a bunch of servers and then run a series of ping tests. The thing is, the list of devices that needs to be pinged is going to be different for each server. So what I want to do is be able to do is read through the... (0 Replies)
Discussion started by: DeCoTwc
0 Replies

6. Shell Programming and Scripting

Execute ssh commands through bash script

Hi all! I am trying to write a script that will check if a certain directory is available at several different nodes and then do stuff in it ..... On the beginning of the script I give as a variable the directory and the number of the nodes and then I loop like this: for... (3 Replies)
Discussion started by: idet2
3 Replies

7. Shell Programming and Scripting

Running script and commands through SSH

Hello All, I am trying to run some simulations through SSH from my mac on our university SOLARIS system. My problem is that whenever I want to execute a command I get an error which says "Invalid argument". Maybe I should explain more what I want to do and what I did. Firstly I installed a... (10 Replies)
Discussion started by: Apfik
10 Replies

8. Shell Programming and Scripting

Script which telnets to a device, runs commands and prints output to a file

I am connecting to a device using telnet, I want my script to perform certain commands : ie- show device , show inventory..etc and write the output it sees from the terminal to a file. this is what I have got : #!/usr/bin/expect -- set running 1 spawn telnet <ip address> expect ... (1 Reply)
Discussion started by: samantha123
1 Replies

9. Shell Programming and Scripting

How to create an executable bash script for these commands?

I wish to create an executable bash script that will run the following commands as root, that is, using sudo su iptables-save | awk '/^ / { print $1 } /^:+ / { print $1 " ACCEPT" ; } /COMMIT/ { print $0; }' | iptables-restoreMy first attempt at bash... (9 Replies)
Discussion started by: thixeqi
9 Replies

10. Shell Programming and Scripting

Create a UNIX script file with multiple commands

Hi Good morning all, I want to create script file with multiple commands. For ex: pmrep connect is one of the command to connect to repository. pmrep objectexport is another command to export objects to a file. These commands should run sequentially.But when i try to execute this, the first... (4 Replies)
Discussion started by: SekhaReddy
4 Replies
UPGT(4) 						   BSD Kernel Interfaces Manual 						   UPGT(4)

NAME
upgt -- Conexant/Intersil PrismGT SoftMAC USB IEEE 802.11b/g wireless network device SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device ehci device uhci device ohci device usb device upgt device wlan Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_upgt_load="YES" DESCRIPTION
The upgt driver supports the USB 2.0 Conexant/Intersil PrismGT series wireless adapters based on the GW3887 chipset. These are the modes the upgt driver can operate in: BSS mode Also known as infrastructure mode, this is used when associating with an access point, through which all traffic passes. This mode is the default. monitor mode In this mode the driver is able to receive packets without associating with an access point. This disables the internal receive filter and enables the card to capture packets from networks which it wouldn't normally have access to, or to scan for access points. upgt supports software WEP. Wired Equivalent Privacy (WEP) is the de facto encryption standard for wireless networks. It can be typically configured in one of three modes: no encryption; 40-bit encryption; or 104-bit encryption. Unfortunately, due to serious weaknesses in WEP protocol it is strongly recommended that it not be used as the sole mechanism to secure wireless communication. WEP is not enabled by default. The upgt driver can be configured at runtime with ifconfig(8). FILES
This driver requires the upgtfw firmware to be installed before it will work. The firmware files are not publicly available. A package of the firmware which can be installed via pkg_add(1) is available: http://weongyo.org/project/upgt/upgt-firmware-2.13.1.0.tar.gz HARDWARE
The upgt driver supports USB 2.0 Conexant/Intersil PrismGT series wireless adapters based on the GW3887 chipset, among them: o Belkin F5D7050 (version 1000) o Cohiba Proto Board o D-Link DWL-G120 Cohiba o FSC Connect2Air E-5400 USB D1700 o Gigaset USB Adapter 54 o Inventel UR045G o SMC EZ ConnectG SMC2862W-G o Sagem XG703A o Spinnaker DUT o Spinnaker Proto Board EXAMPLES
Join an existing BSS network (i.e., connect to an access point): ifconfig wlan create wlandev upgt0 inet 192.168.0.20 netmask 0xffffff00 Join a specific BSS network with network name ``my_net'': ifconfig wlan create wlandev upgt0 ssid my_net up Join a specific BSS network with 64-bit WEP encryption: ifconfig wlan create wlandev upgt0 ssid my_net wepmode on wepkey 0x1234567890 weptxkey 1 up SEE ALSO
arp(4), netintro(4), usb(4), wlan(4), ifconfig(8) HISTORY
The upgt driver first appeared in OpenBSD 4.3. AUTHORS
The upgt driver was written by Marcus Glocker <mglocker@openbsd.org>. The hardware specification was reverse engineered by the people at http://www.prism54.org. CAVEATS
The upgt driver just supports the USB 2.0 devices (GW3887 chipset) but not the USB 1.0 devices containing the NET2280, ISL3880, and ISL3886 chipsets. Some further efforts would be necessary to add USB 1.0 support to the driver. BSD
April 17, 2008 BSD
All times are GMT -4. The time now is 01:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy