I'm need to connect to another host in a script using the telnet command. How do I pass the login and password to be able to connect to the other host from within the script? (10 Replies)
Hi,
How to write a script to perform telnet/ftp operation.
Also please refer some site to get reference about shell scripting.
Thanks in advance
-Arun. (1 Reply)
I am trying to use telnet in shell script but getting following error
error
Connected to crmapp00.agf.ca.
Escape character is '^]'.
Connection closed by foreign host.
Script
#!/bin/ksh
PATH=/usr/sbin/:/usr/bin:/usr/ucb:/etc:/usr/local/bin:.
telnet HOSTNAME <<SCRIPT
user userid... (9 Replies)
Hi All,
I was trying to use telnet in a script to access a certain processor on a certain port to view some processes. The problem is that when I use telnet the output is displayed for me.
The script is:
#!/bin/sh
cd /ahmed/ezzat/
rm ss7trace.log
touch ss7trace.log
chmod 755... (3 Replies)
Hi Guys,
How do I write the script for the following
telnet 192.168.1.100 9002
if the result is less than 1 second. The script should say as port open
if the result takes more than 3 seconds. The script should display as port closed.
Thanks,
Charan (1 Reply)
Hi,
I need a script that take one parameter as destination hostname and two parameter as ranges and tries telnet and records the successful connections.
fo reg:
./testtelnet.sh destination-host 1000 1050
should give me all the port between 1000 and 1050 what successfully connected to... (10 Replies)
Hello,
I wrote a script for doing telnet.However the requirement got changed and now I have to write a telnet script that will
1. Do the telnet from all the virtual ips in a box(Ex: x.x.x.x is the box ip, and x.x.x.1,x.x.x.2 etc are virtual ips associated with that box.)
2. The port range... (0 Replies)
Hello,
I wrote a script for doing telnet.However the requirement got changed and now I have to write a telnet script that will
1. Do the telnet from all the virtual ips in a box(Ex: x.x.x.x is the box ip, and x.x.x.1,x.x.x.2 etc are virtual ips associated with that box.)
2. The port range... (3 Replies)
Discussion started by: coolkid
3 Replies
LEARN ABOUT LINUX
ssh-copy-id
SSH-COPY-ID(1) General Commands Manual SSH-COPY-ID(1)NAME
ssh-copy-id - install your public key in a remote machine's authorized_keys
SYNOPSIS
ssh-copy-id [-i [identity_file]] [user@]machine
DESCRIPTION
ssh-copy-id is a script that uses ssh to log into a remote machine and append the indicated identity file to that machine's ~/.ssh/autho-
rized_keys file.
If the -i option is given then the identity file (defaults to ~/.ssh/id_rsa.pub) is used, regardless of whether there are any keys in your
ssh-agent. Otherwise, if this:
ssh-add -L
provides any output, it uses that in preference to the identity file.
If the -i option is used, or the ssh-add produced no output, then it uses the contents of the identity file. Once it has one or more fin-
gerprints (by whatever means) it uses ssh to append them to ~/.ssh/authorized_keys on the remote machine (creating the file, and directory,
if necessary.)
NOTES
This program does not modify the permissions of any pre-existing files or directories. Therefore, if the remote sshd has StrictModes set in
its configuration, then the user's home, ~/.ssh folder, and ~/.ssh/authorized_keys file may need to have group writability disabled manu-
ally, e.g. via
chmod go-w ~ ~/.ssh ~/.ssh/authorized_keys
on the remote machine.
SEE ALSO ssh(1), ssh-agent(1), sshd(8)OpenSSH 14 November 1999 SSH-COPY-ID(1)