Sponsored Content
Top Forums UNIX for Advanced & Expert Users scp without prompting for password Post 302524687 by purdym on Tuesday 24th of May 2011 08:01:31 AM
Old 05-24-2011
Try running ssh agent to cache the pass phrase.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SSH - Prompting for password

Hi, Can anybody tell me a way to do ssh , without prompting for password from keyboard, Using RSA. The requirement is I need to create the key , using passphrase also..... Is there any way to do it in UNIX ? I am doing it from AIX machine , but remote machine is Linux I tried... (8 Replies)
Discussion started by: shihabvk
8 Replies

2. UNIX for Dummies Questions & Answers

sftp prompting for password

I have the problem with SFTP; BELOW IS the entry from my ssh_config file It's prompting me for password all the time when using SFTP. pLEASE help. (1 Reply)
Discussion started by: dsravan
1 Replies

3. Programming

ssh via java prompting for password

Hi, I have set up my remote server for password-less login via ssh. If I run the command on my server - ssh user@remoteserver "ls -l" I get an output, but when I try to do this via java String sCmd = new String{"/usr/bin/ssh", " user@remoteserver", "\"ls -l\""}; Process p =... (3 Replies)
Discussion started by: nrworld
3 Replies

4. Shell Programming and Scripting

running a script using su - without prompting password

hi guys, is there any way to run a script using su - without prompting a password? ex: su - $APPSUSERNAME/$APPSUSERPASSWORD stop_apps.sh my purpose here is to run a script with current dbuser. thanks in advance. (3 Replies)
Discussion started by: d3xt3r
3 Replies

5. Shell Programming and Scripting

su through normal user prompting for password.

I have two users on linux box, say user1 user2.Both the users are having passwords. Now I would like to run the script from user1 and switch to another user i.e., user2 from the script itself. ** I do have limited access and I am running from the normal user account.Not from the root... (2 Replies)
Discussion started by: giridhar276
2 Replies

6. Shell Programming and Scripting

Prompting for password

Hi, I have SVN installed in my UNIX solaris server. I actually automated the process that downloads code from SVN server to UNIX solaris server in script. When i run the script, its asking for password to download every element. Its really difficult to type password for every element when... (3 Replies)
Discussion started by: gthangav
3 Replies

7. Shell Programming and Scripting

Ssh is prompting for password

Hi, When i am trying to connect to other server using ssh coomand, it is prompting for password. But i want to hardcode it with username so that it should not prompt for password. And i dont want to use "ssh-keygen" method as it is not allowed. Please help me. Regards, Mukta (7 Replies)
Discussion started by: Mukta
7 Replies

8. Shell Programming and Scripting

SFTP prompting for password even though password is in script

Hi All, I am trying to transfer a file from one server to a remote server using SFTP. Client is not ready for key setup. I am working on Solaris 10. Here is the code. #!/bin/ksh # sample automatic Sftp script to dump a file USER="user1" PASSWORD="pass1" HOST="host1" sftp $USER@$HOST... (6 Replies)
Discussion started by: megha2525
6 Replies

9. UNIX for Dummies Questions & Answers

SFTP without prompting password

Dear unix experts, i have a requirement as below. i need to use SFTP as FTP. ftp -n -v << ENDFTP open test_ftp.server user ftp_user_name ftp_password quit ENDFTP if i use this in a shell script, it's not asking for password. But i want the similar thing achived using... (5 Replies)
Discussion started by: AraR87
5 Replies

10. Shell Programming and Scripting

Crontab - password prompting

// Red Hat Enterprise Linux Server release 6.7 I wanted to pass the password, but when I execute this cron, it stops at Password: prompt. Please advise on how to fix the error. Thank you for tour help in advance. #!/usr/bin/ksh su - pmserver echo "su - pmserver" cd... (2 Replies)
Discussion started by: Daniel Gate
2 Replies
SSH-AGENT(1)						    BSD General Commands Manual 					      SSH-AGENT(1)

NAME
ssh-agent -- authentication agent SYNOPSIS
ssh-agent [-c | -s] [-d] [-a bind_address] [-t life] [command [arg ...]] ssh-agent [-c | -s] -k DESCRIPTION
ssh-agent is a program to hold private keys used for public key authentication (RSA, DSA). The idea is that ssh-agent is started in the beginning of an X-session or a login session, and all other windows or programs are started as clients to the ssh-agent program. Through use of environment variables the agent can be located and automatically used for authentication when logging in to other machines using ssh(1). The options are as follows: -a bind_address Bind the agent to the UNIX-domain socket bind_address. The default is /tmp/ssh-XXXXXXXXXX/agent.<ppid>. -c Generate C-shell commands on stdout. This is the default if SHELL looks like it's a csh style of shell. -d Debug mode. When this option is specified ssh-agent will not fork. -k Kill the current agent (given by the SSH_AGENT_PID environment variable). -s Generate Bourne shell commands on stdout. This is the default if SHELL does not look like it's a csh style of shell. -t life Set a default value for the maximum lifetime of identities added to the agent. The lifetime may be specified in seconds or in a time format specified in sshd_config(5). A lifetime specified for an identity with ssh-add(1) overrides this value. Without this option the default maximum lifetime is forever. If a commandline is given, this is executed as a subprocess of the agent. When the command dies, so does the agent. The agent initially does not have any private keys. Keys are added using ssh-add(1). When executed without arguments, ssh-add(1) adds the files ~/.ssh/id_rsa, ~/.ssh/id_dsa and ~/.ssh/identity. If the identity has a passphrase, ssh-add(1) asks for the passphrase on the terminal if it has one or from a small X11 program if running under X11. If neither of these is the case then the authentication will fail. It then sends the identity to the agent. Several identities can be stored in the agent; the agent can automatically use any of these identities. ssh-add -l displays the identities currently held by the agent. The idea is that the agent is run in the user's local PC, laptop, or terminal. Authentication data need not be stored on any other machine, and authentication passphrases never go over the network. However, the connection to the agent is forwarded over SSH remote logins, and the user can thus use the privileges given by the identities anywhere in the network in a secure way. There are two main ways to get an agent set up: The first is that the agent starts a new subcommand into which some environment variables are exported, eg ssh-agent xterm &. The second is that the agent prints the needed shell commands (either sh(1) or csh(1) syntax can be gener- ated) which can be evaluated in the calling shell, eg eval `ssh-agent -s` for Bourne-type shells such as sh(1) or ksh(1) and eval `ssh-agent -c` for csh(1) and derivatives. Later ssh(1) looks at these variables and uses them to establish a connection to the agent. The agent will never send a private key over its request channel. Instead, operations that require a private key will be performed by the agent, and the result will be returned to the requester. This way, private keys are not exposed to clients using the agent. A UNIX-domain socket is created and the name of this socket is stored in the SSH_AUTH_SOCK environment variable. The socket is made accessi- ble only to the current user. This method is easily abused by root or another instance of the same user. The SSH_AGENT_PID environment variable holds the agent's process ID. The agent exits automatically when the command given on the command line terminates. FILES
~/.ssh/identity Contains the protocol version 1 RSA authentication identity of the user. ~/.ssh/id_dsa Contains the protocol version 2 DSA authentication identity of the user. ~/.ssh/id_rsa Contains the protocol version 2 RSA authentication identity of the user. /tmp/ssh-XXXXXXXXXX/agent.<ppid> UNIX-domain sockets used to contain the connection to the authentication agent. These sockets should only be readable by the owner. The sockets should get automatically removed when the agent exits. SEE ALSO
ssh(1), ssh-add(1), ssh-keygen(1), sshd(8) AUTHORS
OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH protocol versions 1.5 and 2.0. BSD
January 17, 2010 BSD
All times are GMT -4. The time now is 09:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy