Sponsored Content
Top Forums Shell Programming and Scripting How to execute command in remote server without entering password? Post 302625671 by bapu1981 on Wednesday 18th of April 2012 05:48:46 AM
Old 04-18-2012
How to execute command in remote server without entering password?

Hi,

i want to run the command in remote server through ssh and every time when i run the script its asking to enter the password. I dnt want to enter the password, when i enter the ip address and directly the command shuld execute.

Script:
Code:
#!/bin/bash
echo "Enter Server IP Address:"
read b
scp /tmp/script.sh srom@$b:/tmp
ssh srom@$b chmod +x /tmp/script.sh
ssh srom@$b /tmp/script.sh


Last edited by Franklin52; 04-18-2012 at 08:14 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remote Copy without entering Username and Password

I tried the following script to copy one file automatically: #!/bin/csh -f su - root -c "rcp 150.10.128.1:/export/home/sn408Xl/sn408Sol/$fn $fn This works fine but is there a better way to copy remotely without entering the username and password? Moreover, after the file is copied a... (1 Reply)
Discussion started by: ilak1008
1 Replies

2. Shell Programming and Scripting

How to Execute UNIX Scritp on Remote server

Hi Please suggest me How I can Execute UNIX Scritp on Remote server. Thanks Sourabh (2 Replies)
Discussion started by: sourabhshakya
2 Replies

3. UNIX for Advanced & Expert Users

How to use SFTP from command line without entering user and password

I would like to use SFTP from command line without entering userid and password. Here is what I have gathered and did. 1) Create a public and private key pair for the protocol you want to use. To create a key pair for use by SSH2, enter: ssh-keygen -t dsa I did that and got... (7 Replies)
Discussion started by: Hangman2
7 Replies

4. Shell Programming and Scripting

Execute scripts on remote server

Hi All, I need to first of all establish a connection to remote unix server non-interactively with the help of a shell script and then connect to oracle database from that server all with this script of mine. Please suggest the best method which could be used to connect to server for executing... (1 Reply)
Discussion started by: m_kapur83
1 Replies

5. Shell Programming and Scripting

How to give user name and password in a single command to login to remote server

Hello All, I'm new to unix and i need the below favour from you. I have list of 50 unix server. I need to login to all the server one by one and with the same user and password. I will declare the user name and password globally in the script. for example : servername- hyperV user name... (4 Replies)
Discussion started by: Hari A
4 Replies

6. Shell Programming and Scripting

Execute a local script against a remote server

I am unable to run the below script against a remote server due to syntax error (then unexpected), but i am able to run it locally. Am i executing it correctly or is there any other way to execute it. ssh username@servernname ksh -s < scriptname #!/bin/ksh function record { ((end =... (5 Replies)
Discussion started by: NarayanaPrakash
5 Replies

7. HP-UX

Connect to remote server using sftp with password define within command/script

I am trying to connect to remote server in hp-ux, using sftp command (using sftp username@ip and password ) able to connect to remote server but, in this case sftp prompt for password and user need to manually enter it. I want sftp can read a password define in script or from file, so it can... (1 Reply)
Discussion started by: ketanraut
1 Replies

8. Solaris

Not getting command prompt after entering the login password

Hi All, I am not able to get the command prompt after entering the login password on solaris server Only access is through console. Server type : sun4u sparc SUNW,Netra-T12 bsnl-north-in > ssh 10.147.17.207 jtoin Connecting to 10.147.17.207 as user jtoin Password: Last login: Wed Mar 5... (1 Reply)
Discussion started by: sandeep_kmehra
1 Replies

9. Solaris

Script to get files from remote server to local server through sftp without prompting for password

Hi, I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script. Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies

10. Shell Programming and Scripting

Sudo connect to a remote server and execute scripts in remote server

Hello Every one!! I am trying to write a shell script which will connect to a remote server and execute scripts which are at a certain path in the remote server. Before this I am using a sudo command to change the user. The place where I am stuck is, I am able to connect to the... (6 Replies)
Discussion started by: masubram
6 Replies
yppasswdd(8yp)															    yppasswdd(8yp)

Name
       yppasswdd - server daemon for modifying the yellow pages (YP) password file

Syntax
       /usr/etc/rpc.yppasswdd file [ -m arg1 arg2 ...  ]

Description
       The daemon is a server that handles password change requests from It changes a password entry in the specified file, which is assumed to be
       in the same format described in An entry in file will be changed only if the password presented by matches the encrypted password  of  that
       entry.

       If  the	option is given, then after file is modified, a will be performed in Any arguments following the flag will be passed to The option
       should be set only at a YP master server machine.

       This server is not run by default, nor can it be started up from If it is desired to enable remote password updating for the yellow  pages,
       then an entry for should be put in the file of the host serving as the master for the yellow pages file.

Examples
       If the yellow pages password file is stored as then to have password changes propagated immediately, the server should be invoked as:
       /usr/etc/rpc.yppasswdd /var/yp/src/passwd -m passwd DIR= /var/yp/src

Files
See Also
       yppasswd(1yp), passwd(5yp), ypfiles(5yp), ypmake(8yp)

																    yppasswdd(8yp)
All times are GMT -4. The time now is 03:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy