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 302986839 by gabak on Wednesday 30th of November 2016 12:38:36 PM
Old 11-30-2016
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
 

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
MKDNS323FW(1)							   User Commands						     MKDNS323FW(1)

NAME
mkdns323fw - build firmware images for the DNS-323 from a kernel and initrd SYNOPSIS
mkdns323fw -k KERNEL -i INITRD [-d DEFAULTS] -p PRODUCT_ID -c CUSTOM_ID -m MODEL_ID -o OUTPUTFILE DESCRIPTION
mkdns323fw creates firmware images suitable for upload to the D-link DNS-323 and other, similar devices based on the same basic firmware image, such as the Conceptronics CH3SNAS. These firmware images contain a kernel and initrd, as well as various product-specific values and checksums. This command can be very dangerous; although it attempts to do some very, very basic sanity checking, it is still quite easy to generate a firmware file that, when loaded into your device, will kill it stone dead. This program is not able to check that you're uploading valid data to your device; if you brick it, you're on your own. -k kernel, --kernel=kernel specify the file containing the kernel image to embed in the firmware image. This must be a uBoot image file, as produced by mkim- age(1) with appropriate options to specify it as a kernel image. Attempts to provide a non-uBoot file will fail, while specifying a non-kernel uBoot file may well brick your device. This option is required. -i initrd, --initrd=initrd the initrd file to embed in the firmware image. This must be a uBoot image file, as produced by mkimage(1) with appropriate options to specify it as a ramdisk. The tool will refuse to embed a non-uBoot file, however a dodgy ramdisk will likely brick your device. -d defaults.tar.gz, --defaults=defaults.tar.gz The firmware format has the ability to embed a tarball with a default configuration; if you want to do this, you may use this option to do so. However, the devices that the author has dealt with do not require such a thing, and leaving it out still produces a valid firmware (and one that is a bit smaller, to boot). -s signature, --defaults=signature For reasons that will probably remain unknown until the ends of time, there are (at least) two different firmware signatures running around that are otherwise identical in their internal structure, which are used for different devices. This option exists to allow you to specify the signature that you want to use in your firmware build. Valid values for this option are currently FrodoII (R)(the default if this option is not specified), Chopper (R)or Gandolf (R)which is used in some devices. See the table at the top of the script if you don't know which value to use for your device. --p product_id, --product-id=product_id --c custom_id, --custom-id=custom_id --m model_id, --model-id=model_id Specify the product, custom, and model ID that this firmware image is intended for. As several different devices share the same firmware format, the intended device type is encoded in these fields. If you do not specify the correct values for the device that you are targetting with your firmware, it is quite likely that the device will refuse the upload. Known-good values for various devices are provided in the header of the script; please look there for more information. You can also obtain the values you need by downloading an existing firmware for the device you're targetting and doing a bit of digging. -o outputfile, --output=outputfile Where to write the completed firmware image. Will overwrite any existing file of the same name. BUGS
E-mail bug reports to theshed+dns323-firmware-tools@hezmatt.org. I don't guarantee to be able to help, but I'll give it a shot. Patches are far more helpful. AUTHOR
mkdns323fw was written by Matt Palmer, based on reverse-engineering work done by Leschinsky Oleg. COPYRIGHT
Copyright (C) 2008 Matt Palmer. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE, to the extent permitted by law. SEE ALSO
mkimage(1), splitdns323fw(1). dns323-firmware-tools 0.1 October 2008 MKDNS323FW(1)
All times are GMT -4. The time now is 09:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy