10 sFTP Command Examples to Transfer Files on Remote Servers in Linux

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

Narad Shrestha

He has over 10 years of rich IT experience which includes various Linux Distros, FOSS and Networking. Narad always believes sharing IT knowledge with others and adopts new technology with ease.

TecMint users Get a Free Domain and 30% off on Inmotion Web Hosting - Signup with Inmotion Now!

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

10 Responses

  1. David Juma says:

    Thanks alot. This post helped me move lots of files remotely. I like the simplicity and the approach in whole article. Keep Up!

  2. Farhan Islam says:

    1 Important thing you forget to include

    For those having SFTP/SSH on different port can use below

    sftp -oPort=3476 user@host

    Where 3476 is port number.

    Thanks

  3. Seva says:

    I want to transfer an entire folder from one linux machine to another linux machine.
    Please let me know the command for the same.

  4. david says:

    sftp will not pass along a password as a parameter and you cannot script reading the password. You must either manually enter the password or use RSA keys to bypass using passwords. Search for “sftp rsa key password” and you will find many examples of how to do this. (This drove me crazy when I was first learning sftp, I was used to scripting the password for ftp).

    • Rajesh says:

      ssh-keygen -t rsa
      cd .ssh
      ls
      u have show the public key
      scp publickey oracle@sys2:/tmp
      u have cp the torget file have 1777 permessions
      k u have go to another system
      cd .ssh
      ls
      cp /tmp/publickey authorized_keys
      service sshd restart
      go to sys1
      ssh sys2
      do not ask the passwd

  5. rp says:

    use sftp –password=”passboss”

  6. Kamal says:

    Hi,

    Generally it will prompt to enter password if we enter SFTP command.
    Is it possible to enter the password into the SFTP command so that I do not see a prompt again asking for password.

    Could you please suggest the syntax,

    My SFTP command is like this, then it will ask for a password say ‘passboss’
    sftp -o StictHostKeyChecking=no -oProxyCommand=’/usr/bin/nc -abcdef.kk.lmmm:1080 %h %p’ user@kkkk.jjjjj.com 22

    Could you please add the password in the above syntax so that it will not prompt again.

    eagerly awaiting ur reponse.

    Regards,
    Kamal

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Join Over 62000+ Linux Users
  1. 47558
  2. 2150
  3. 11343

Enter your email to get latest Linux Howto's