Hi all,
We are having troubles trying to connect with sftp to a ssh server. Lets me tell you what the case is:
We have been given with an account 'acc2' in machine B, where the SSH server is installed. This account indeed does not exists in machine A where the SSH client resides. Then I proceed that way:
Login in machine A with an existing account 'acc1'
Generate the keys pair with 'ssh-keygen -t rsa'
Transfer the public key to machine B using the account we were given 'acc2' and store their contents in acc2's $HOME/.ssh/authorized_keys (cat id_rsa.pub >> .ssh/authorized_keys)
Change permission of .ssh/authorized_keys to 600
Then I tried to establish a SSH connection from machine A to machine B using:
Ssh -i .ssh/id_rsa acc2@machineB
But I been always prompted for the acc2 password instead of the acc1 passphrase. The trace (when using -v) indicates that the privkey authentication method does not work and the only successful one is the password method. What am I doing wrong?
Would the problem be that the keys pair must be generated using acc2 in machine A (thus the same account in both machines)?
I would appreciate very much if you can help us because I am completely lost now.
Kind regards,
MJGC
We are having troubles trying to connect with sftp to a ssh server. Lets me tell you what the case is:
We have been given with an account 'acc2' in machine B, where the SSH server is installed. This account indeed does not exists in machine A where the SSH client resides. Then I proceed that way:
Login in machine A with an existing account 'acc1'
Generate the keys pair with 'ssh-keygen -t rsa'
Transfer the public key to machine B using the account we were given 'acc2' and store their contents in acc2's $HOME/.ssh/authorized_keys (cat id_rsa.pub >> .ssh/authorized_keys)
Change permission of .ssh/authorized_keys to 600
Then I tried to establish a SSH connection from machine A to machine B using:
Ssh -i .ssh/id_rsa acc2@machineB
But I been always prompted for the acc2 password instead of the acc1 passphrase. The trace (when using -v) indicates that the privkey authentication method does not work and the only successful one is the password method. What am I doing wrong?
Would the problem be that the keys pair must be generated using acc2 in machine A (thus the same account in both machines)?
I would appreciate very much if you can help us because I am completely lost now.
Kind regards,
MJGC