• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

rsync over ssh port number on Linux/Unix system

May 23, 2014 by Sharad Chhetri Leave a Comment

Question: How may I rsync the files to remote server which has custom ssh port number ?

Answer: To rsync the files and directories with ssh to remote server we use the option -e .
And to define the custom port number with ssh option within rsync command,we use the option -p.

Syntax:

rsync -avz -e 'ssh -p ' source destination

You can see the below given example:

rsync -avz -e 'ssh -p 2560' /opt/backup.tar root@192.168.40.1:~

In above given example:

ssh port number = 2560 (means port number 2560 is used for ssh rather than port no. 22).
source is /opt/backup.tar
root is a user for ssh authentication.Replace root with your available authenticating user.
destination is 192.168.40.1:~ (~ means user’s home directory)

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. rsync all files,hidden files,symlinks,hardlinks to remotes Linux Server
  2. Change the default port number of ssh server
  3. run command in remote linux / unix system by using ssh
  4. How To Find Absolute Full Path Of Command On Linux / Unix : which command
  5. Find exit status code of last executed command on Linux and Unix
  6. 6 important examples of cd command on Linux and Unix Systems
  7. print working directory ( pwd , PWD , OLDPWD ) in Linux / Unix
  8. Linux / Unix : whoami command use and advantage
  9. Head command in Linux / Unix
  10. What is Linux Internal And External Command

Filed Under: Linux, Linux Commands Tagged With: linux command, rsync

Reader Interactions

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

SSH WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

AttributeError: ‘WSGIRequest’ object has no attribute ‘session’ Django python web framework

Terminal Recording with script and scriptreplay command

Set GRUB password after installation of CentOS/Red Hat

safest method to remove softlink in linux

Print double hyphen sign simultaneously in post of Octopress

How to change smtp port number 25 in postfix

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy