Sponsored Content
Full Discussion: ssh script problem problem
Top Forums Shell Programming and Scripting ssh script problem problem Post 302219030 by Annihilannic on Monday 28th of July 2008 01:44:36 AM
Old 07-28-2008
Use ssh -n otherwise it gobbles up the stdin provided to your while read line ; do ... done loop.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SSH Problem auth problem

Hi, Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode: warning: You have no controlling tty. Cannot read confirmation.^M warning: Authentication failed.^M Disconnected; key exchange or algorithm negotiation... (1 Reply)
Discussion started by: budrito
1 Replies

2. UNIX for Dummies Questions & Answers

Problem with SU or SSH in shell script

Hi Floks! This is Sravan! I am new to linux and I am trying to write bash shell script in which I want to change the user but the statements which are after the "su " command are not working that I mean I want to execute some statements as the changed user here is the code ... (2 Replies)
Discussion started by: sravanp
2 Replies

3. AIX

ssh problem

I thought I had seen all errors in SSH but the following is new to me: buffer_get: trying to get more bytes 129 than in buffer 6 Anyone seen this before please? Google search returns nothing of use that I can see. I am running an lpar on a 52A and the O/S is AIX 5.3 TL 4CSP. (2 Replies)
Discussion started by: johnf
2 Replies

4. Solaris

ssh problem

Hi, I am trying to ssh to a server. Senario is as below: I have two servers A and B both are solaris and having ssh version Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL I have created proper keys on both using key-gen and copied public keys appropriatly. I am able to ssh from A to B... (1 Reply)
Discussion started by: Muktesh
1 Replies

5. Shell Programming and Scripting

Problem with executing script using ssh

I'm writing a script which is meant to ssh into a remote machine, sed a file there, and write the output to a new file on the remote machine. Obviously the easy way to do this is to write and execute the script on the remote machine, but I'm trying to do this all via ssh since I like to keep and... (4 Replies)
Discussion started by: maethlin
4 Replies

6. Shell Programming and Scripting

problem using ssh

Hi, I have 2 users say user a and user b both in different unix boxes. I thave to execute a script in user b via user a. I tried using ssh for it but my script is not getting executed. My script goes as: from user a- ssh userb@host " sh script.sh" script.sh is placed in user b... (11 Replies)
Discussion started by: Taranjeet Singh
11 Replies

7. Shell Programming and Scripting

Problem using ssh inside script

Hi, When runnin the following script it complte successfully with out any problem #!/bin/sh SERV="crm1" for s in $SERV do export WebLogicSessions=`ssh psoft@$s "cd /software/psoft/scripts ; ./getweblogicsessions.sh crm1 8001 PIA | awk '{print $1}' ` echo "Checking number of... (0 Replies)
Discussion started by: yoavbe
0 Replies

8. UNIX for Dummies Questions & Answers

Error Executing a script(SSH problem)

Hi i m writing a script which will fetch data from different machines and display it on single terminal. I have created a file named SERVERNAMES containing ip address of machines i need to monitor. Then for every IP i m issuing ssh command to get date on that machine. However When i m trying... (3 Replies)
Discussion started by: pinga123
3 Replies

9. Solaris

ssh problem

Hi Guys, when I try to login to one of my sun server (sparc) from within an open putty session on another server I get this message: bash-3.2$ ssh 10.0.0.10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @... (1 Reply)
Discussion started by: cjashu
1 Replies

10. Shell Programming and Scripting

Problem with ssh script

I want to execute below the script for remote server.i am not able to execute below the script please help me urgent for this issue.i getting below the error ssh user@server<<EOJ cd path for i in * do echo $i done EOJ Pseudo-terminal will not be allocated because stdin is not a... (1 Reply)
Discussion started by: SAUD PASHA
1 Replies
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)
All times are GMT -4. The time now is 06:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy