scp

Is there a way to specify the location of a local jsch.jar from within build.xml?

我只是一个虾纸丫 提交于 2019-12-04 20:42:45
问题 build.xml contains <scp> and <sshexec> tasks, so I provide jsch.jar and other libraries in the same directory together with build.xml. The following taskdef: <taskdef name="scp" classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp" classpath="WebContent/WEB-INF/lib/jsch-0.1.43.jar" /> throws an error A class needed by class org.apache.tools.ant.taskdefs.optional.ssh.Scp cannot be found: com/jcraft/jsch/UserInfo I cannot modify the standard Ant installation (e.g. put jsch.jar in ant lib

How to ssh on Debian

混江龙づ霸主 提交于 2019-12-04 17:45:01
How to ssh on Debian 1. installation >>> apt-get install ssh PS: This is a convenient way to install both the OpenSSH client and the OpenSSH sever. More details: aptitude show ssh OR: >>> apt-get install openssh-sever openssh-client 2. Generating public/private key >>> ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The

Copy and append files to a remote machine: cat error

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 16:31:47
So, I have a bit of a problem: Originally I was using scp to copy a file from a local machine to a remote machine before I realized that scp overwrites instead of appends. But I need it to append. So I did some Googling and this alternative using cat and ssh popped up instead: cat localfile | ssh user@remoteserver "cat >> remotefile" Problem is, I get this interesting error whenever I use that method: bash: cat: command not found When I normally ssh into my remote machine, I can cat just fine, so I'm looking for either help fixing this problem or finding a way to append using only commands

Scp command between 2 servers with 2 different .pem keys

帅比萌擦擦* 提交于 2019-12-04 16:17:18
I want to transfer a folder from server A to server B with scp and 2 different .pem keys. Is this the best way to go about it and will this actually work. scp -i ~/Documents/server1.pem -r root@server1.com:~/location/to/dir -i ~/Documents/server2.pem ~/location/to/copy/to or do I have to input: scp -i ~/Documents/server1.pem -r root@server1.com:~/location/to/dir -i ~/Documents/server2.pem root@server2.com:~/location/to/copy/to I am just not sure with the second location if I need to input the host or just the location. Many thanks for your help. Create a config file like ~/scp_config : Host

Transfer entire directory using ssh2 in Nodejs

末鹿安然 提交于 2019-12-04 15:07:55
I'm just wondering whether it is at all possible to transfer a directory from a unix server to my local machine using the ssh2 module in node.js. I have connected to the remote host and can read the directory as well as transfer single files, but there are 28 folders in the directory which each contain files and sub directories. What I'd like to do is take an exact copy of the main directory from the server to my local machine. I was using fastGet with single files, but transferring a directory gives: Error: EISDIR, open __dirname/../localdirectory/ which I think implies I can't use fastGet to

mysql备份

一世执手 提交于 2019-12-04 13:41:31
冷备份 cp scp 冷恢复 cp scp #1修改auto.cnf #如果是root权限,修改/var/lib/mysql下所有文件属主 属组成Mysql 热备份 mysqldump 库名 > 文件 #提取备份库 mysqldump 库名 表名 > 文件 #提取备份表 mysqldump --all-databases > 文件 #提取备份所有库 热恢复 mysql < 文件 mysql >source /路径/文件 锁表 flush tables with read lock; 解锁 unlock tables; show slave status\G stop slave; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; #写多少跳过多少条错误 start slave; show slave status\G stop slave; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 0; start slave; show slave status\G 来源: https://www.cnblogs.com/renyz/p/11868608.html

Linux中cp和scp命令的使用方法

此生再无相见时 提交于 2019-12-04 13:11:14
Linux中cp和scp命令的使用方法 Linux为我们提供了两个用于文件copy的命令,一个是cp,一个是scp,但是他们略有不同。 cp --- 主要是用于在同一台电脑上,在不同的目录之间来回copy文件 scp --- 主要是在不同的Linux系统之间来回copy文件 关于cp的具体用法: 命令基本格式: cp [OPTIONS] SOURCE DEST --- 从源路径copy文件到目的路径 cp [OPTIONS] SOURCE... DIRECTORY --- 将多个源文件copy到指定的目录(多个源文件用空格分隔) OPTIONS: -a same as -dpR 尽可能将源文件状态、权限等资料都照原装予以复制,并且是递归copy; -r 表示递归copy,若source中含有目录名,则将目录下之档案亦皆依序拷贝至目的地; -f 表示force,若目的地已经有相同档名的档案存在,则在复制前先予以删除再行复制; 范例: 1. 将档案 aaa 复制(已存在),并命名为 bbb: cp aaa bbb 2. 将所有的C语言程式拷贝至 Finished 子目录中: cp *.c Finished/ 关于scp的具体用法: 不同的Linux之间copy文件常用有3种方法: 第一种就是ftp,也就是其中一台Linux安装ftp Server

Hadoop2.2集群 ssh免密码登陆

醉酒当歌 提交于 2019-12-04 13:01:57
我搭建的7台机器,master,slaves1,node1,node2,node3,node4,node5 用户名是:hadoop,系统用的是centos6.5 64位 1、在master和各节点下的 /home/hadoop/.ssh 文件下执行了 ssh-keygen -t rsa 会产生文件: id_ras is_ras.pub 两个文件 2、 复制所有的 slave 服务器的公钥到 master 的 .ssh 目录下 在slave1机器上:scp ~/.ssh/id_rsa.pub hadoop@master:~/.ssh/slave1.pub node1机器上: scp ~/.ssh/id_rsa.pub hadoop@master:~/.ssh/node1.pub 其他的节点一次类推。 3、 在 master 服务器把所有服务器的公钥加入到用于认证的公钥文件: [hadoop@master ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys [hadoop@master ~]cat ~/.ssh/slave1.pub >> ~/.ssh/authorized_keys 4、 对 authorized_keys 进行授权: [hadoop@master ~]chmod 600 ~/.ssh/authorized_keys

How can I convince z/OS scp to transfer binary files?

人走茶凉 提交于 2019-12-04 09:11:39
We have SSH-based file transfer scripts currently set up for Linux-to-Linux and we're porting them to z/OS to go z/OS-to-Linux. Note that this is with USS, the UNIX system services within z/OS otherwise known as OMVS, which uses EBCDIC under the covers, not zLinux which uses ASCII. We've set up all the SSH key files and what-not, and the transfer itself is working fine. However z/OS, in it's infinite wisdom, insists on converting the files from EBCDIC to ASCII despite the fact that they're binary files - this is screwing up the content of the destination files. The scp manpage on z/OS states: