New answers tagged

0

Probably because Connecting to <server>... is sent to file descriptor 2 (stderr). Remember that the only difference between file descriptors 1 (stdout) and 2 (stderr) is that the former is traditionally used for normal messages while the latter is traditionally used for debug or error outputs. However, the program decides what goes to one channel or ...


-1

Why I am still getting it? Because sftp prints this message into stderr, and you redirected stderr to stdout, i.e. your terminal, with 2>&1. You see, file descriptors like &1 aren't links (or pointers, if you're familiar with the concept)—they're values. So when you type 2>&1, what really happens is: Your shell figures out where ...


0

Delete the line Subsystem sftp /usr/lib/openssh/sftp-server in /etc/ssh/sshd_config (and restart sshd). However, in the absence of sftp, many clients will fall back to scp and ls. To disable file transfer, you need to remove that binary as well (usually at /usr/bin/scp). But this won't disable directory structure information, which (probably) uses ls. ...


2

No. internal-sftp is evaluated inside of sshd server. If you use wrapper script as ForceCommand already, you can't go back. Even if you could, in chroot you don't have the sshd binary either. Unfortunately, ForceCommand different from internal-sftp blocks even the sftp subsystem (subsystem is internally handled as a command). Only way to do that is to copy ...


0

Found Notepad ++ to be very useful for correcting this after attempting the answer cat -A scriptname> dos2unix scriptname as this still presented errors when trying to convert. Through Notepad ++ there's the option in the edit menu/EOL Conversion/Unix/OSX Format. Still very much a learner but this method solved my problem, however the previous ...


0

I faced some similar issue recently, and I noticed that lftp[1] does the job nicely with wildcards. The systems I'm working on are vanilla redhat boxes, so I could imagine that this command could be available for you, too. [1] http://lftp.yar.ru/


1

AFAIK, it will not be possible to copy files from (s)FTP using wildcards. Though, you can achieve the desired things by mounting the (s)FTP locally by using curlftpfs. You can use wildcards then from locally mounted drive


0

I've seen the behavior you describe before, but testing it now I can create symlinks just fine on an sshfs-mounted directory: $ touch T $ ln -s T L $ ls -l T L lrwxrwxrwx 1 user user 1 Apr 9 16:10 L -> T -rw-rw-r-- 1 user user 0 Apr 9 16:10 T $ echo hello >> L $ cat T hello $ pwd /home/user/oak/tmp $ mount | grep oak user@oak: on /home/user/oak ...


-1

You want rsync. You can transfer files from the local or remote machine. ?> rsync -avz user@host.ip:/path/to/remote/path path/to/local



Top 50 recent answers are included