New answers tagged

0

Mount the remote directory tree through SSHFS. SSHFS is a remote filesystem that uses the SFTP protocol to access remote files. If the server allows SFTP access, you can use SSHFS (from the server's point of view, it's the same thing). On the client side, you need to be authorized to use FUSE, which is the case on most modern unices. Once you've mounted the ...


1

sftp -q user@host:/dir <<<"ls *.txt" | grep -v '^sftp>` But that will work only if sftp is not asking by password. Because of grep -v that will affect sftp on asking by password. But i think it is a lot of times simple if using tail. sftp -q user@host:/dir <<<"ls *.txt" | tail -n+2


1

Use the -q option to tell sftp to be quiet, thereby suppressing most of the output you don't care about: echo "ls *.txt" | sftp -q user@host.example.com:/path You will still see the lines for the interactive prompt to which you are echoing, e. g. sftp> ls *.txt, but those can be filtered out with a grep -v: echo "ls *.txt" | sftp -q ...


0

Simplest solution is to cd into the directory where you want to save the files and then run the expect script, leaving out the lcd command from the script on line 8.


0

You might want to consider using ssh instead of sftp to obtain the list of the files from server B. Like : file_list_server_b=$(ssh server.b "find /path/to/files -name pattern") With ssh you can just execute a command on the remote server and obtain the output of it. You can also execute a loop block. I guess in this case you also have to to set up ...


1

Typically virtual box and VMware both configure the network connection to the vm via the host to be NAT based, on an isolated subnet from the the test of the LAN. This has the benefits and drawbacks of the NAT implementation on most peoples home routers. You aren't 'visible' to the network/internet unless you initiate the traffic or configure port ...


2

I don't believe there is a specific sftp file limit. There are regular filesystem file limits, and limits imposed by ulimits, but they're not special to sftp. So the answer is, sftp file transfers are limited by either the target filesystem limits, or the ulimits set for the user in question. Given modern AIX filesystems have very large limits, you're ...


2

The best bet would be to use key pair to access the server as you do for ssh. Three steps: Create a key pair (if you don't have yet): ssh-keygen -t rsa -C "" -f ~/.ssh/id_rsa Copy public key to the server: ssh-copy-id user@example.com -p 12322 Connect to the server: lftp sftp://user@example.com:12322 If you will use some non-standard path for the ...


0

According to the lftp man page, ~/.netrc is supported/used by lftp: ~/.netrc The file is consulted to get default login and password to FTP server. Passwords are also searched here if an URL with user name but with no password is used. Based on this reading, I suspect that your URL, using custom ports, should be fine. Hope this helps!



Top 50 recent answers are included