The -o option is used to pass one option to the sftp-command. You need two of them, so you need two -o.
You also could put the options in your ~/.ssh/config file, so you don't have to pass them on the command line: ---------- Post updated at 16:31 ---------- Previous update was at 16:26 ----------
You even can add the username
then all you need on the commandline is
I've noticed most of my postings here are because of syntax errors.
So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)
Hi,
While I am trying SFTP my machine to another unix machine ,
it was working fine till 10 min back.
But now i am getting the below error
"Request for subsystem 'sftp' failed on channel 0"
Could you please someone help me to solve or analyise the root cause...
Cheers:b:,
Mahiban (0 Replies)
Hi,
I am using SunOS
I want to serch my previous command
from unix prompt
(like on AIX we can search by ESC -k)
how to get in SunOs
urgent help require. (10 Replies)
Hi,
I have situation where i need to automate transferring 10000+ files using sftp.
while read line
do
if ; then
echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt
fi
done< files.txt
sftp -b sftpCommand.txt stu@192.168.2.1
The above... (1 Reply)
Hello,
There's a third-party application's command that shows the application's status like "tail -f verybusy.log". When use the command, the output comes every 1-sec. but when it goes in a script below the output comes every 8-sec...What is the problem and how can I fix it?
open(CMD,... (2 Replies)
Hello,
I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration.
#pwd... (8 Replies)
I had the below sftp script working perfectly but the problem is I am not able to send the echo statements .
#!/bin/sh
echo "Starting to sftp..."
sftp admin@myip << END_SCRIPT
cd /remotepath/
lcd /localpath/
mget myfiles*.csv
bye
END_SCRIPT
echo "Sftp successfully."
echo
echo... (11 Replies)
Hi i am new to shell scripting and any help is really appreciated.
my requirement is in,
ps -e -o pid,uname,cmd
how can i split and take only the cmd part from it.
I tried awk but the issue is when the cmd is returning a lengthy command which itself has some spaces it is truncating the... (7 Replies)
Discussion started by: Jojo90
7 Replies
LEARN ABOUT DEBIAN
qpsmtpd::command
Qpsmtpd::Command(3pm) User Contributed Perl Documentation Qpsmtpd::Command(3pm)NAME
Qpsmtpd::Command - parse arguments to SMTP commands
DESCRIPTION
Qpsmtpd::Command provides just one public sub routine: parse().
This sub expects two or three arguments. The first is the name of the SMTP command (such as HELO, MAIL, ...). The second must be the
remaining of the line the client sent.
If no third argument is given (or it's not a reference to a CODE) it parses the line according to RFC 1869 (SMTP Service Extensions) for
the MAIL and RCPT commands and splitting by spaces (" ") for all other.
Any module can supply it's own parsing routine by returning a sub routine reference from a hook_*_parse. This sub will be called with
$self, $cmd and $line.
On successfull parsing it MUST return OK (the constant from Qpsmtpd::Constants) success as first argument and a list of values, which will
be the arguments to the hook for this command.
If parsing failed, the second returned value (if any) will be returned to the client as error message.
EXAMPLE
Inside a plugin
sub hook_unrecognized_command_parse {
my ($self, $transaction, $cmd) = @_;
return (OK, &bdat_parser) if ($cmd eq 'bdat');
}
sub bdat_parser {
my ($self,$cmd,$line) = @_;
# .. do something with $line...
return (DENY, "Invalid arguments")
if $some_reason_why_there_is_a_syntax_error;
return (OK, @args);
}
sub hook_unrecognized_command {
my ($self, $transaction, $cmd, @args) = @_;
return (DECLINED) if ($self->qp->connection->hello eq 'helo');
return (DECLINED) unless ($cmd eq 'bdat');
....
}
perl v5.14.2 2009-04-02 Qpsmtpd::Command(3pm)