Sponsored Content
Top Forums Shell Programming and Scripting how do i execute a set of commands in telnet?? Post 302609741 by Corona688 on Tuesday 20th of March 2012 11:22:33 AM
Old 03-20-2012
Extremely difficult in telnet. You may have to use a third-party brute-forcing utility like expect.

If ssh is available to you, it will be trivial.

Code:
ssh host < commands

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute Loop in Telnet

hi Everyone , have a nice day #!/bin/sh ( sleep 1 echo "LOGIN:username:password;" sleep 1 while IFS= read -r line do #echo $line GET:VOUCHERDETAIL:VoucherSerialNumber,$line; >> /home/status_log done < /home/status.txt sleep 1 echo "LOGOUT;") | telnet 127.0.0.1 7021 , it... (2 Replies)
Discussion started by: Dastard
2 Replies

2. Shell Programming and Scripting

Execute scripts from remote using telnet

Hi having the below code (sleep 1 echo "username" sleep 2 echo "password" sleep 2 echo "cd /home/test1/path" sleep 10 echo "ls -l | grep filename" if exists echo "script1.sh filename" echo "mailx -s "Task Executed" user@domain.com" else echo "mailx -s "File not Exist"... (1 Reply)
Discussion started by: karthikn7974
1 Replies

3. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

4. UNIX for Dummies Questions & Answers

Only execute telnet and ping for user

Hello for all! This is the situation: I must create many users that only can execute telnet and ping. Create users is not a problem, but I donīt know how limit the users privileges, to only execute telnet and ping. I hope you can help me. Thank's for all. Bye :) PD: Sorry for my... (4 Replies)
Discussion started by: bobbasystem
4 Replies

5. Shell Programming and Scripting

ssh - to execute set of commands

Hi Can someone help me to figure out Want to execute few cmds in remote host thru ssh Tried below cmd -------------------------------excerpt------------------- RDIR=/data1/logs ---> variable stores rem. server directory TODAY="`date '+%b %d'`" ssh -i $userid@$host "cd... (2 Replies)
Discussion started by: id100
2 Replies

6. Shell Programming and Scripting

Telnet to router and execute command

I am trying to write a shell script to execute some commands.. telnet <IP address of the router> wait 10 echo "username" echo "password" sh log exit but i am unable to execute it properly ..please help me .. thanks in advance Sri (1 Reply)
Discussion started by: srikanthus2002
1 Replies

7. Shell Programming and Scripting

expect telnet script execute by cronjob

hi, please help, keep getting this bolded error and look it up and people say its your environment variable though i tried to set it manually in expect..it run fine if i run it manually but once i run it by cronjob it error below..i tried to comment out ip/login info with *.. logfile:: START... (0 Replies)
Discussion started by: cssanangeles
0 Replies

8. Shell Programming and Scripting

Telnet using port and execute cmd

Hi, my query is: I am Login on server with IP xxx.xxx.xxx.xxx.. and i want a script where i want to telnet to server with IP yyy.yyy.yyy.yyy using specific port and then execute a cmd there on server Y please suggest (1 Reply)
Discussion started by: dodasajan
1 Replies

9. Shell Programming and Scripting

How to execute telnet commands thru xterm?

I want to launch an xterm telnet window: xterm -e telnet xxx.xxx.xx.xxx Which I can do but needs to also launch commands as well. Please use CODE tags as required by forum rules! (2 Replies)
Discussion started by: shopgirl08
2 Replies

10. Shell Programming and Scripting

Telnet connection closes before i execute GET command

I tried the below steps for telnet command from a remote server: 1. telnet myservice.com 443 2. GET / HTTP/1.0 3. Press enter key twice Please see the output below: bash-3.2$ hostname remoteserver1 bash-3.2$ telnet myservice.com 443 Trying 191.172.172.133... Connected to... (7 Replies)
Discussion started by: mohtashims
7 Replies
ssh-keysign(1M)                                                                                                                    ssh-keysign(1M)

NAME
ssh-keysign - ssh helper program for host-based authentication SYNOPSIS
ssh-keysign ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication with SSH protocol version 2. This signature is of data that includes, among other items, the name of the client host and the name of the client user. ssh-keysign is disabled by default and can be enabled only in the global client configuration file /etc/ssh/ssh_config by setting Host- basedAuthentication to yes. ssh-keysign is not intended to be invoked by the user, but from ssh. See ssh(1) and sshd(1M) for more information about host-based authen- tication. /etc/ssh/ssh_config Controls whether ssh-keysign is enabled. /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, readable only by root, and not accessible to others. Because they are readable only by root, ssh-keysign must be set-uid root if host-based authentication is used. ssh-keysign will not sign host-based authentication data under the following conditions: o If the HostbasedAuthentication client configuration parameter is not set to yes in /etc/ssh/ssh_config. This setting cannot be overri- den in users' ~/.ssh/ssh_config files. o If the client hostname and username in /etc/ssh/ssh_config do not match the canonical hostname of the client where ssh-keysign is invoked and the name of the user invoking ssh-keysign. In spite of ssh-keysign's restrictions on the contents of the host-based authentication data, there remains the ability of users to use it as an avenue for obtaining the client's private host keys. For this reason host-based authentication is turned off by default. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsshu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ ssh(1), sshd(1M), ssh_config(4), attributes(5) AUTHORS
Markus Friedl, markus@openbsd.org HISTORY
ssh-keysign first appeared in Ox 3.2. 9 Jun 2004 ssh-keysign(1M)
All times are GMT -4. The time now is 06:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy