Hi All,
I am using SFTP command to transfer the file.
Code:
SRC=`pwd`
DIG=123
/bin/sftp -B /dev/stdin xyz@abc.net <<::
mput ${SRC}/GGG.${DIG}.tar.gz
bye
::
The problem is, after entring into sftp command, it is not taking variable values of SRC and DIG.
can someone help me what is the other way.
ok I have a new sftp server Suse Linux I have 2 ipaddress on it, 10.2.10.26 and 10.2.10.27, I want to keep them seperate and only ssh to "27" and not have sftp work, and on "26 I want to sftp and not ssh
but when I ssh or sftp to 26 neither work but 27 does.
Also keep in mind that I am coming from Solaris 9 when this happens and when I come from a linux box everything works
I have read documentation on SCP and just trying to figure out how go about doing this - below are two pieces of code, one is SFTP and one is SCP. My goal is to have this done via password-less authentication, fully automated.
I'm running Debian stable and I'm looking to establish the following environment for users in my 'sftponly' group:
jailed
can transfer with SFTP
can transfer with SCP
cannot login interactively with SSH
From my experimentation and research, it seems that the following stanza in sshd_config gets me 90% there:
Match group sftponly
ChrootDirectory /sftp/%u
X11Forwarding no
AllowTcpForwarding no
Trying to check the SFTP status but if & else condition not working
Please help me
#!/bin/bash
DATE=`date +%Y-%m-%d:::%H:%M`
>/tmp/common.log
Log=`grep quit /tmp/common.log | awk '{print $2}'`
echo "Starting to sftp...." >> /tmp/common.log
{
sftp SELTST@192.168.10.2 << EOF >> /tmp/common.log
quit >
We have 5 servers running our code: A, B , C, D and E.
From local machine, we sftp the file to A.
Then ssh id@A
su - applicationname
sftp id@A
get
bye
tar -xzf
logout
logout
The same procedure we apply for others B to E.
Is there any way we can simplify this using script ?
We have requested linux team to provide passwordless authentication.
Hi,
I am not able to give the password in Unix script for SFTP connection.
When I am trying to manully SFTP command for accessing the server , it asking for pwd and I could provide the pwd but I am not getting how to provide the pwd inside the Unix script.
Code:
sftp -v user@xyz.com.
This command is working but how to pass password for connecting the server via Unix bash script.
B
Hi Guys,
I am able to create a file with all the sftp command required.
I was able to ftp the files in the similiar fashion using ftp command. The following i used for ftp.
Code:
ftp -n < $filename
But when i try the same for Sftp.
After using the SSH quite a lot on my 1.5 week old Debian 6 VPS, I wanted to start uploading files through SFTP. I already tried that earlier, but with the root account, which isn't possible with SSH anymore due to security changes.
So I've made a separate user, let's call him sftpuser for now, who belongs to the group sftp.