April 28, 2016

Transfer of files from local server to remote linux server

Hi,

I have to transfer file from one linux server to remote linux server through sftp protocol.
I am able to do it through ssh and sftp commands.
But the problem is , every time when I do, remote server password is asked.
How can we bypass password prompt?
Generation of keys and changing any parameter in config files are not permitted.
I tried using tar command too, it did not work.
tar cvzf - /test/Test.txt | ssh @ "dd of=/remoteIP/home/test/test.gz
Please help me on this.

Thanks.

Answer to the question

You said that generation of keys and changing any parameters are not permitted. Are you an administrator on this system? If not, your level of system rights will be limited. There is a way to login into a remote system without entering a password. Of course you want to do this securly using ssh as it is the recommended method of network remote logging. sftp is accessing an ftp service through an ssh tunnel.

When you generate an ssh key, you will get both a private key and a public key. The private keys stays on your system. The public key is sent to the remote host. When you login again using the same account with the private key into the remote account with the public key, you are granted access without the need to submit a passwrd. 

Debian has a few good articles that outlines how to setup an ssh key and how to use it to log into a remote system.

"How to seup and ssh key so you don't have to use a password" https://www.debian.org/devel/passwordlessssh.en.html

"Remote login using ssh" https://www.debian.org/doc/manuals/debian-handbook/sect.remote-login.en.html#sect.ssh

Like  (0 likes)
Click Here!