scp

scp files from local to remote machine error: no such file or directory

瘦欲@ 提交于 2019-12-02 17:31:59
I want to be able to transfer a directory and all its files from my local machine to my remote one. I dont use SCP much so I am a bit confused. I am connected to my remote machine via ssh and I typed in the command scp name127.0.0.1:local/machine/path/to/directory filename the local/machine/path/to/directory is the value i got from using pwd in the desired directory on my local host. I am currently getting the error No such file or directory Looks like you are trying to copy to a local machine with that command. An example scp looks more like the command below: Copy the file "foobar.txt" from

Scp command syntax for copying a folder from local machine to a remote server [closed]

ぃ、小莉子 提交于 2019-12-02 17:26:28
I am using putty for copying files from local machine to remote server.My folder is in C:/site can any one give syntax for copying folder from C:/site to remote server using scp scp -r C:/site user@server_ip:path path is the place, where site will be copied into the remote server EDIT : As I said in my comment, try pscp , as you want to use scp using PuTTY . The other option is WinSCP In stall PuTTY in our system and set the environment variable PATH Pointing to putty path. open the command prompt and move to putty folder. Using PSCP command Please check this 来源: https://stackoverflow.com

SCP Permission denied (publickey). on EC2 only when using -r flag on directories

a 夏天 提交于 2019-12-02 16:58:59
scp -r /Applications/XAMPP/htdocs/keypairfile.pem uploads ec2-user@publicdns:/var/www/html where uploads is a directory returns Permission denied (publickey). However scp -i /Applications/XAMPP/htdocs/keypairfile.pem footer.php ec2-user@publicdns:/var/www/html works (notice the flag change). uploads is an empty folder These are the file permissions for the uploads directory drwxrwxrwx 3 geoffreysangston admin 102 Nov 15 01:40 uploads These are the file permissions for /var/www/html drwxr-x--- 2 ec2-user ec2-user 4096 Jan 5 20:45 html I've tried changing html to 777 and that doesn't work either

recursively use scp but excluding some folders

馋奶兔 提交于 2019-12-02 16:31:33
Assume there are some folders with these structures /bench1/1cpu/p_0/image/ /bench1/1cpu/p_0/fl_1/ /bench1/1cpu/p_0/fl_1/ /bench1/1cpu/p_0/fl_1/ /bench1/1cpu/p_0/fl_1/ /bench1/1cpu/p_1/image/ /bench1/1cpu/p_1/fl_1/ /bench1/1cpu/p_1/fl_1/ /bench1/1cpu/p_1/fl_1/ /bench1/1cpu/p_1/fl_1/ /bench1/2cpu/p_0/image/ /bench1/2cpu/p_0/fl_1/ /bench1/2cpu/p_0/fl_1/ /bench1/2cpu/p_0/fl_1/ /bench1/2cpu/p_0/fl_1/ /bench1/2cpu/p_1/image/ /bench1/2cpu/p_1/fl_1/ /bench1/2cpu/p_1/fl_1/ /bench1/2cpu/p_1/fl_1/ /bench1/2cpu/p_1/fl_1/ .... What I want to do is to scp the following folders /bench1/1cpu/p_0/image/

How to copy file from a Vagrant machine to local host

℡╲_俬逩灬. 提交于 2019-12-02 16:15:36
I want to copy a local file from a Vagrant machine to my local host, but I am getting an error message: ssh: connect to host 127.0.0.1 port 22: Connection refused [user@localhost ceil]$ scp -p 2222 vagrant@127.0.0.1:/home/vagrant/devstack/local.conf . cp: cannot stat ‘2222’: No such file or directory ssh: connect to host 127.0.0.1 port 22: Connection refused I also tried using using localhost but still got the same error. You should read the manual page for scp . The correct syntax is: scp -P 2222 vagrant@127.0.0.1:/home/vagrant/devstack/local.conf . The uppercase P is for "port". Lowercase is

linux scp复制文件

て烟熏妆下的殇ゞ 提交于 2019-12-02 16:07:41
转载地址:https://www.runoob.com/linux/linux-comm-scp.html Linux scp 命令用于 Linux 之间复制文件和目录。 scp 是 secure copy 的缩写, scp 是 linux 系统下基于 ssh 登陆进行安全的远程文件拷贝命令。 scp 是加密的, rcp 是不加密的,scp 是 rcp 的加强版。 scp [可选参数] file_source file_target -1: 强制scp命令使用协议ssh1 -2: 强制scp命令使用协议ssh2 -4: 强制scp命令只使用IPv4寻址 -6: 强制scp命令只使用IPv6寻址 -B: 使用批处理模式(传输过程中不询问传输口令或短语) -C: 允许压缩。(将-C标志传递给ssh,从而打开压缩功能) -p:保留原文件的修改时间,访问时间和访问权限。 -q: 不显示传输进度条。 -r: 递归复制整个目录。 -v:详细方式显示输出。scp和ssh(1)会显示出整个过程的调试信息。这些信息用于调试连接,验证和配置问题。 -c cipher: 以cipher将数据传输进行加密,这个选项将直接传递给ssh。 -F ssh_config: 指定一个替代的ssh配置文件,此参数直接传递给ssh。 -i identity_file: 从指定文件中读取传输时使用的密钥文件

Copying files from server to local computer using SSH [closed]

旧城冷巷雨未停 提交于 2019-12-02 14:38:19
I am having trouble copying files from a remote server using SSH. Using PuTTY I log in to the server using SSH. Once I find the file I would like to copy over to my computer, I use the command: scp username@host.com:/dir/of/file.txt \local\dir\ It looks like it was successful, but it only ends up creating a new folder labeled 'localdir' in the remote directory /dir/of/ . How can I copy the file to my local computer over SSH? It depends on what your local OS is. If your local OS is Unix-like, then try: scp username@remoteHost:/remote/dir/file.txt /local/dir/ If your local OS is Windows ,then

SSH SCP Local file to Remote in Terminal Mac Os X

我的梦境 提交于 2019-12-02 14:05:58
I am attempting to copy a local file 'magento.tar.gz' from my local machine to a remote server using SSH through a VPN. This is connecting to the Virtual Machine's Internal IP which I've used as xx.x.x.xx here. I have full 'sudo' access on the SSH account so there shouldn't be any problem copying across. I have tried the following: I have tried the following (the magento.tar.gz file is already in the local root dir) sudo scp magento.tar.gz user@xx.x.x.xx/var/www/ This asks me to type in my local password. Afterwards returns cp: user@xx.x.x.xx/var/www: Not a directory sudo scp /Users/myname

scp with port number specified

时间秒杀一切 提交于 2019-12-02 13:46:43
I'm trying to scp a file from a remote server to my local machine. Only port 80 is accessible. I tried: scp -p 80 username@www.myserver.com:/root/file.txt . but got this error: cp: 80: No such file or directory How do I specify the port number in a scp command? Unlike ssh, scp uses the uppercase P switch to set the port instead of the lowercase p: scp -P 80 ... # Use port 80 to bypass the firewall, instead of the scp default The lowercase p switch is used with scp for the preservation of times and modes. Here is an excerpt from scp's man page with all of the details concerning the two switches

远程传输命令scp

血红的双手。 提交于 2019-12-02 12:34:16
Linux scp 命令用于 Linux 之间复制文件和目录。 scp 是 secure copy 的缩写, scp 是 linux 系统下基于 ssh 登陆进行安全的远程文件拷贝命令。 scp 是加密的,rcp是不加密的,scp 是 rcp 的加强版。 scp 命令用于在网络中安全的传输文件,格式为:“scp [参数] 本地文件 远程帐户@远程IP地址:远程目录”。 参数 作用 -v 显示详细的连接进度 -P 指定远程主机的sshd端口号 -r 传送文件夹时请加此参数 -6 使用ipv6协议 例:将本地文件/home/111.txt传送到远程主机的/home目录: 同样,我们也可以将远程文件传送到本地 来源: https://www.cnblogs.com/hzk001/p/11745451.html