LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to simulate scp command using ssh? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-simulate-scp-command-using-ssh-684105/)

vickylife 11-17-2008 12:34 PM

How to simulate scp command using ssh?
 
How to simulate scp command using ssh?

zQUEz 11-17-2008 12:39 PM

Do you have an example of what you are trying to do? Basically scp uses the same framework as ssh. In other words, by using scp you are using ssh to do your file copy.

vickylife 11-17-2008 12:46 PM

Quote:

Originally Posted by zQUEz (Post 3345146)
Do you have an example of what you are trying to do? Basically scp uses the same framework as ssh. In other words, by using scp you are using ssh to do your file copy.

Well i want to set up a ssh key pair between two machines making sure that i should be asking password only once. Now problem is when i generate key pairs first i have to check if
1) if ~/.ssh file exists in remote machines. If not, create one
2) scp the public key to remote machine
3) cat rsa.pub >> authorized_keys in remote machine.

Now each of this step requires ssh/scp. Can someone tell me how to do this all by prompting for password only once.

zQUEz 11-18-2008 05:22 AM

In terms of setting up your keys on the servers, I don't think you can. You need to go through the manual task of setting them up. However, once they are there, you can use ssh-agent to have password-less logins (or 1 password and then it is automated). http://mah.everybody.org/docs/ssh

Or you could do keys with no passphrase and then have your private key stored in an encrypted file that gets mounted (truecrypt)


All times are GMT -5. The time now is 01:19 AM.