sftp

Use RSA with Eclipse Remote Systems Explorer?

穿精又带淫゛_ 提交于 2020-01-02 00:51:08
问题 I'm using the Remote Systems Explorer (RSE) plugin in Eclipse on my Windows 7 machine to edit files through SFTP on a remote Linux server. I have an RSA key pair setup between my machine and the Linux server, and I can SSH using my keys no problem when I'm at a Cygwin command prompt. I'm not able to get the keys working in Eclipse, though. I added my RSA private key to Eclipse through Preferences -> General -> Network Connections -> SSH2. I also have my public key on the remote Linux server

lftp with key + passphrase? [closed]

元气小坏坏 提交于 2020-01-01 08:22:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm using lftp to send files to a sftp server, but i don't how to connect with key and passphrase. So in sftp, I can do this : sftp -i .ssh/id_rsa.mykey login@my.host.fr Enter passphrase for key '.ssh/id_rsa.mykey': my passphrase here So, how can I using lftp with this connecting method ? 回答1: You must specify

lftp with key + passphrase? [closed]

拥有回忆 提交于 2020-01-01 08:22:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm using lftp to send files to a sftp server, but i don't how to connect with key and passphrase. So in sftp, I can do this : sftp -i .ssh/id_rsa.mykey login@my.host.fr Enter passphrase for key '.ssh/id_rsa.mykey': my passphrase here So, how can I using lftp with this connecting method ? 回答1: You must specify

Can't get SFTP to work in PHP

落爺英雄遲暮 提交于 2020-01-01 07:38:27
问题 I am writing a simple SFTP client in PHP because we have the need to programatically retrieve files via n remote servers. I am using the PECL SSH2 extension. I have run up against a road block, though. The documentation on php.net suggests that you can do this: $stream = fopen("ssh2.sftp://$sftp/path/to/file", 'r'); However, I have an ls method that attempts to something similar public function ls($dir) { $rd = "ssh2.sftp://{$this->sftp}/$dir"; $handle = opendir($rd); if (!is_resource($handle

Upload a file-like object with Paramiko?

冷暖自知 提交于 2020-01-01 04:36:29
问题 I have a bunch of code that looks like this: with tempfile.NamedTemporaryFile() as tmpfile: tmpfile.write(fileobj.read()) # fileobj is some file-like object tmpfile.flush() try: self.sftp.put(tmpfile.name, path) except IOError: # error handling removed for ease of reading pass Is it possible to do an upload like this without having to write the file out somewhere? 回答1: Update As of Paramiko 1.10 , you can use putfo: self.sftp.putfo(fileobj, path) Instead of using paramiko.SFTPClient.put , you

Using JSch ChannelSftp: How to read multiple files with dynamic names?

风格不统一 提交于 2019-12-31 09:00:13
问题 I have to read a bunch of .CSV files with dynamic file names from a SFTP server. These files get generated every 15 minutes. I am using JSch's ChannelSftp, but there is no method which would give the exact filenames. I only see an .ls() method. This gives a Vector e.g. [drwxr-xr-x 2 2019 2019 144 Aug 9 22:29 ., drwx------ 6 2019 2019 176 Aug 27 2009 .., -rw-r--r-- 1 2019 2019 121 Aug 9 21:03 data_task1_2011_TEST.csv, -rw-r--r-- 1 2019 2019 121 Aug 9 20:57 data_task1_20110809210007.csv] Is

How do I copy files stored in a remote SFTP server to another folder in the same remote server using Java?

筅森魡賤 提交于 2019-12-30 11:42:27
问题 I have been trying to copy few selected files (after performing few checks), in a remote server to the same remote server using: File localFile = new File(srcPath); sftpChannel.put(localFile.getAbsolutePath(),localFile.getName()); I have even tried to copy those selected files to my local machine using the get() method. Can somebody help? 回答1: A core SFTP protocol does not support duplicating a remote file. There's draft of copy-file extension to the protocol, but that's supported by only few

How do I copy files stored in a remote SFTP server to another folder in the same remote server using Java?

不羁的心 提交于 2019-12-30 11:42:19
问题 I have been trying to copy few selected files (after performing few checks), in a remote server to the same remote server using: File localFile = new File(srcPath); sftpChannel.put(localFile.getAbsolutePath(),localFile.getName()); I have even tried to copy those selected files to my local machine using the get() method. Can somebody help? 回答1: A core SFTP protocol does not support duplicating a remote file. There's draft of copy-file extension to the protocol, but that's supported by only few

phpseclib doesn't upload correct file contents

半城伤御伤魂 提交于 2019-12-30 11:29:26
问题 So what it does is successfully connects then uploads the file logo.png but the contents of the file isn't what was on web host or uploaded with html if i use a html upload code. What it puts in the file is the ACTUAL text between the second ' 's so for that very example the contents of logo.png is literally logo.png and not the picture. require_once("ftp/vendor/autoload.php"); use phpseclib\Net\SFTP; $sftp = new SFTP('SERVER'); if (!$sftp->login('USER', 'PW')) { throw new Exception('Login

How to move file from directory A to directory B in remote server?

前提是你 提交于 2019-12-30 10:44:14
问题 I am using JSch to connect to SFTP in a website which is made from GWT. I had read a little example of sftpChannel.get() , sftpChannel.rename() , sftpChannel.rm() But I didn't find a solution that copy a file from remote server a directory to remote server b directory. For example, I want to copy file from /appl/user/home/test/temp to /appl/user/home/test/ . Filename = abc.jpg . I stunned here for few hours since most of the solution from network is getting file from remote server to local,