Tag Info

New answers tagged

0

On Solaris, chmod 777 is setting an absolute mode. Absolute means absolute. If you want to keep ACLs, you need to use symbolic mode. See the man page: http://docs.oracle.com/cd/E23824_01/html/821-1461/chmod-1.html#scrolltoc


0

It's actually just a wart of LFTP that it even asks for the password. If you provide a dummy password, such as the literal string dummy (e.g. lftp sftp://<username>:dummy@<target>), lftp won't prompt for a password, and will then subsequently check with the ssh agent. Mind you, if you don't a key set up, that password will be used. You can ...


1

As others have remarked, you need to pass the get commands as input to sftp. You can do it with a here document. Also, note that sftp doesn't have a mget command. sftp "username@server:$path" <<'EOF' get ubpbilp* ./ get cust.cmp* ./ get bunc.cmp* ./ EOF SFTP isn't very convenient to script. If the server allows scp, use it. If you just want to copy ...


2

Perhaps like this: sftp username@server <<EOT cd $path get ubpbilp* get cust.cmp* get bunc.cmp* quit EOT as sftp doesn't support mget.


1

You can combine all the actions in one command: sftp user@host:/path/to/file/$(tail -1 file1.txt |tr -s ' ' |cut -d ' ' -f 9) This will fetch the file into the current working directory. If you need to fetch the file into another directory specify the destination directory as a next argument to the sftp command.


1

Yes, have a look at Ubuntu SFTP-Only Account How-to: Step 1- Create a Group for the Restricted Accounts For the sake of this example, we’ll create a new group called ‘sftponly‘ It’s best to use the addgroup command to do this, as it takes care of allocating an un-used GID (Group Identifier) to the new group for us: sudo addgroup sftponly ...


0

I understand your question but there are certain facts about SFTP connection: 1.First for sftp connection ssh must enabled. 2.If ssh enable then you must login with the ssh user@hostname/ip , if you don't know ip then use command ifconfig after login with ssh. 3.If you know the hostname then you can find out the IP with the command ping ...


0

I have think that you can use scp command You should create a ssh key. How to generate a key Now, you can copy the files in other server. scp file user@server.com:/path/ I hope that it work


0

Run sftp with the -b option: sftp -b - XXX@XXX.XXX.XXX.XXX <<== cd etc. == From the sftp manual: -b batchfile Batch mode reads a series of commands from an input batchfile instead of stdin. Since it lacks user interaction it should be used in conjunction with non-interactive authentication. A batchfile of ‘-’ may be used to indicate ...


2

By design ssh doesn't allow 'embedding' of passwords - that's because it has a mechanism for non-interactive auth using public-private key pairs. So I would suggest you consider that as your first port of call. Usually it's as simple as: run ssh-keygen on your client. add the id_rsa.pub to ~/.ssh/authorized_keys on your server. If that's not an ...


0

Use get command instead of mget. Sftp do not support mget command. And separate commands with newline cd "FtpFolder" get "YYYYMMDD_REPORT - AUTO SAVE _ 1.TXT"



Top 50 recent answers are included