script that can give login password for "ssh" without involving STDIN


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting script that can give login password for "ssh" without involving STDIN
# 1  
Old 08-02-2008
Data script that can give login password for "ssh" without involving STDIN

Hi Folks,
I am writing a shell script that can logon to remote machine automatically. But, I am facing one problem. I am using "ssh" command in script and while login into remote machine it asks for passowrd and it stops for STDIN input for password. I want my script to supply password automatically so that it doesn't stop and wait for passowrd to enter from STDIN input. Is there any workaround for this problem?Smilie
# 2  
Old 08-02-2008
you can use Expect to provide the password

also check if you can generate and use SSH key
# 3  
Old 08-03-2008
I agree with Yogesh Sawant, ssh is perfect for this.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. OS X (Apple)

"Permission denied" when trying to SSH my iPhone though password is correct

Hi, I hope this is the correct section in the forum to post as I'm trying to SSH from my MacBook. I was looking to see whether ssh on my jailbroken iPhone 6s (10.3.1) still works fine and was following this old reddit guide. I installed OpenSSH&OpenSSL from Cydia and changed the password using... (7 Replies)
Discussion started by: hss1
7 Replies

3. Shell Programming and Scripting

login to more than one pc (simultaneously) using "ssh"

Hi all, can any one have idea that " how to login to more than one PC (simultaneously) using "ssh" "? (1 Reply)
Discussion started by: kavi.mogu
1 Replies

4. UNIX for Dummies Questions & Answers

Why PieTTY echo login password as "*"?

Normally, When we login a remote server, the password does'nt echo as anything. But When I use PieTTY(on windows) to login a linux ssh server, the password echoes as "*". But When I have logged in, I use the ssh command to login the same server locally again, now the password does'nt echo. I... (7 Replies)
Discussion started by: vistastar
7 Replies

5. HP-UX

Unable To Perform A "Passwordless" SSH Login To A Server

Greetings! I am trying to perform a passwordless SSH login from a HPUX 11.31 client to a HPUX 11.31 server. Whenever I do a "ssh -l root serverA" from the client, I am prompted for a password. Giving the password, I am able to successfully login. However I am trying to accomplish a... (9 Replies)
Discussion started by: Rob Sandifer
9 Replies

6. AIX

ssh public key auth "Remote login for account is not allowed" ?

Hello, Using AIX 6.1 boxes. User user1 connects from box A to box B using ssh. When password authentication is used everything is fine. When I configure user1 to use public key authentication sftp client works fine(no password asked), but ssh client fails. This is sshd log: Accepted publickey... (3 Replies)
Discussion started by: vilius
3 Replies

7. UNIX for Advanced & Expert Users

How to allow particular user only to login as a root using "ssh" ?

Q1 I want to allow particular user only to login into root using ssh. I have set PermitRootLogin no for security purpose but I want to allow some of the users to login as a root using ssh how to do this? I have tried with Allowusers user1 user2 its working for only the user1 and... (3 Replies)
Discussion started by: ungalnanban
3 Replies

8. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

9. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies
Login or Register to Ask a Question