I am not able to throw a file from server173 to server067
i.e.
wlsuser@server173> scp /tmp/harsha.txt wlsuser@server067:/tmp
fails
However, I am able to pull a file from server173 onto server067's /tmp dir
wlsuser@server067> scp wlsuser@server173:/tmp/harsha.txt /tmp
wlsuser's Password:
harsha.txt 100% |***********************************************************************************************************| 49 00:00
Is this becoz of the way keys are setup for wlsuser profile wlsuser@server173>
Can you explain me what needs to be done inorder to get the visa versa working ?
I need
wlsuser@server173> scp /tmp/harsha.txt wlsuser@server067:/tmp
to work
where should i generate the keys and where should I import the public key ?
Source got from browsing ..
Creating a key
Use ssh-keygen. I recommend the '-t rsa' option, which creates an RSA key
for use with version 2 of the SSH protocol. (You can use '-t rsa1' for a
version 1 key and '-t dsa' for a DSA key, which may not be supported
everywhere.)
Note that with SSH1 there is no -t option, because there's only one type
of key.
Running ssh-keygen
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa): [press enter for default]
Enter passphrase (empty for no passphrase): [not shown]
Enter same passphrase again: [not shown]
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
44:c8:07:c9:f8:f4:f5:9b:05:d1:0f:d1:05:f0:5d:bf user@localhost
$
Allowing login via that key
On the remote host, add the line in /home/user/.ssh/id_rsa.pub to
~/.ssh/authorized_keys.
Quick approach
$ scp ~/.ssh/id_rsa.pub somehost:.
user@somehost's password: [not shown]
id_rsa.pub 100% |*****************************| 225 00:00
$ ssh somehost
user@somehost's password: [not shown]
somehost$ cat id_rsa.pub >> ~/.ssh/authorized_keys
somehost$ rm id_rsa.pub
somehost$ exit
$ ssh somehost
Enter passphrase for key '/home/user/.ssh/id_rsa': [not shown]
somehost$
Hi,
Can you reply with my server-names in mind to help me understand better.
I created keys using
wlsuser@server173> ssh-keygen -b 2048 -t rsa
it gave me two files
id_rsa
id_rsa.pub
Then, I copied the contents of "id_rsa.pub" to the "authorized_keys" of server067.
Did not restart anything and tried this command
wlsuser@server173> scp /tmp/harsha.txt wlsuser@server067:/tmp
It still does not work.
What am I missing ?