2022 Developer Survey is open! Take survey.

Questions tagged [sftp]

The SSH File Transfer Protocol (SFTP) provides secure file transfer functions using the same infrastructure used by the Secure Shell protocol. It can be seen as a secure replacement for FTP.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

SFTP jailed user access limited to an Apache webserver directory

I would like to create an SFTP jail for a user, jailed to an Apache webserver directory. User should access only /var/www/html/sftpaccess/ directory. Currently the /var/www/html/sftpaccess/ ...
user avatar
  • 394
1 vote
2 answers
82 views

SSH/SCP CLI Connection Works Correctly, but SFTP via GUI Refuses to Connect

I recently configured a new web server (AWS EC2 instance) running Ubuntu 22.04. I am able to connect to the server via SSH/SFTP/SCP through a CLI on both Windows and Mac, but when I attempt an SFTP ...
user avatar
2 votes
0 answers
28 views

SFTP user permission denied

I have created a new sftpuser with below format. sudo adduser --shell /bin/false sftpuser sudo passwd sftpuser sudo mkdir -p /var/sftp/files sudo chown sftpuser:sftpuser /var/sftp/files sudo chown ...
user avatar
  • 41
0 votes
0 answers
20 views

sftp to webserver behind proxy [duplicate]

I host a couple of websites on a webserver Centos 7 that is behind an ubuntu 20.04 proxy server (apache for http), as depicted in the figure below. Up until now there was no need to have sftp access ...
user avatar
1 vote
0 answers
11 views

How to force Group for new folders IN new folders with SFTP Ubuntu

I'm running into this issue where I use g+s and a chgrp to set the group, but when I create a new file or folder in a new directory, it doesn't inherit the group. For example: /dir1 has g+s and a ...
user avatar
0 votes
1 answer
47 views

How to use if function in shell scripts?

I need to use if function to filter out required files only when using SFTP to copy files to my server from a remote server. Here is my try to get the all data inside /filesnew. #!/bin/bash files=`...
user avatar
  • 41
0 votes
0 answers
30 views

SFTP: rename/remove commands fail intermittently

I have a background job written in Ruby that connects to several SFTP servers, download some files and finally, move the downloaded files to another folder in the sftp server. The issue is that the ...
user avatar
  • 202
0 votes
0 answers
59 views

How can I speed up my lftp uploads when I'm mirroring?

Here's my script: #! /usr/bin/bash set -xe local_path="${1-./}" lftp -u user,pass host << EOF set ftp:ssl-allow yes set ftp:ssl-protect-data yes set ftp:ssl-protect-list yes set ftp:...
user avatar
1 vote
1 answer
48 views

SFTP from local desktop to Solaris 11 using client tools is failing

I am trying to copy files from my local drive to Solaris 11 host using WinSCP and it is failing with the below error message: Cannot initialize SFTP protocol. Is the host running an SFTP server? I ...
user avatar
  • 13
3 votes
2 answers
269 views

Compare files across servers

Once upon a time I remember doing something roughly like this: vimdiff <(scp://some_server/home/user/.zshrc) <(scp://some_server-qa/home/user/.zshrc) (where some_server and some_server-qa are ...
user avatar
  • 8,411
0 votes
0 answers
27 views

How to stop linux user even being able to see other user's directories

I'm building an sFTP solution but I can't stop group1user from seeing or more exactly listing group2user's directories. I've configured it so that group1user can't actually get into group2user's ...
user avatar
1 vote
1 answer
101 views

Ubuntu SFTP Client with sudo capability

Recently I completely switched to Ubuntu for my work computer. But I have one problem. On Windows I used WinSCP to connect to remove development server via SFTP and I can't find any app for Ubuntu ...
user avatar
2 votes
0 answers
17 views

Permission when setting up sftp on Ubuntu

Okay, so I'm setting up an sftp server on Ubuntu 20.04. There will be multiple users accessing the box through sftp and I want each one of them to only have access to their own directory. I don't want ...
user avatar
  • 423
0 votes
0 answers
22 views

sftp directory-change shortcut

If sitting at an arbitrary unix desktop system and using sftp (e.g. OpenSSH as shipped by Debian) to contact another arbitrary system, is there any shorthand that can be used to switch to the same ...
user avatar
0 votes
0 answers
20 views

Sftp passwordless systemctl ask for password , but /etc/sbin/sshd -d not

I have two environments a Qual and a Prod environments. I am trying to setup a passwordless connexion with usernologin. Everything is working well on the Qual environment. Permissions on .ssh ...
user avatar
1 vote
1 answer
219 views

sshd_config ForceCommand is blocking scp

I want to execute certain script on every SSH connection for admin user, for that I have added below lines to sshd_config: Match User admin ForceCommand /etc/my_script.sh Script is getting executed ...
user avatar
  • 11
0 votes
2 answers
46 views

How to transfer files between two server accounts

I have two server accounts (tow student user accounts of same university Linux server). I would like to transfer files between them using SFTP command. I tried to login the first user account using $ ...
user avatar
3 votes
1 answer
44 views

Accessing directories outside of chroot jail

I'm setting up an SFTP server that several different clients will use. My main issue is that it's absolutely crucial that employees of one client DO NOT see even the directory names of other clients' ...
user avatar
  • 31
0 votes
0 answers
16 views

Issue with SFTP URIs for grouped hosts in SSH config file

I'm enjoying the possibility to group the various hosts in ~/.ssh/config by prefixing them with a word/string and a slash: Host Development/alpha Hostname 1.2.3.4 User superman ...
user avatar
6 votes
1 answer
516 views

Different timestamps in SFTP "ls -l" vs. "ls -lh"

I have a 3rd-party SFTP server on which I want to check some file timestamps. However, I do get different results for the same file if I use ls -l vs. ls -lh: sftp> ls -l [...] -rwxrwxrwx 1 0 ...
user avatar
1 vote
1 answer
118 views

Copying files over SSHFS/SFTP/SCP is slow [closed]

I'm trying to copy large files (~5GB, one file) between Windows and (remote) Linux. Windows and Linux are on the same LAN, but over VPN connection. They are physically far from each other, but ...
user avatar
  • 207
1 vote
1 answer
37 views

SFTP dual authentication with batchfile

I'm trying to connect to a server where dual authentication (publickey,password) is enabled. I'm using sshpass to provide password to automate the script, but when I have batchfile with SFTP, ...
user avatar
  • 1,519
0 votes
1 answer
643 views

How to list all files and get the total size of all files in an sftp server?

I am connected to an sftp server using sftp -i key.pem user@server The server contains logs and I can list logs up to 4 days old using ls. The problem is that ls does not seem to be able to fetch ...
user avatar
0 votes
0 answers
89 views

Change default SFTP directory in Cygwin

On a Windows server, I've installed OpenSSH via Cygwin to mainly connect via SFTP. I would like to change the default directory for the SFTP server. When I log via ssh to this server, my entry point ...
user avatar
  • 161
1 vote
0 answers
716 views

Download file via SFTP one line CLI command with password containing special character (no ssh key)

I've got a Synology that needs to download and archive a file from SFTP server. I used to use WGET when FTP protocol was being used, but the file owner changed the protocol to SFTP. wget -m ftp://...
user avatar
0 votes
1 answer
67 views

zftp connection refused, sftp works

When I try to sftp into a virtual machine's IP address it works well (I am able to do all the sftp provided operations). But when I try to use zsh's zftp for the same IP address, the connection is ...
user avatar
0 votes
1 answer
56 views

How to forward output of split to sftp?

I have a server that is running out of disk space. I want to move some TB sized directories into a long term archive. This is a tape robot with preferred file size of 16GB. Therefore I want to split ...
user avatar
  • 15
1 vote
1 answer
300 views

SFTP giving all permissions to a user

How can I give all permissions to a SFTP user? I mean to have acess to all folders, delete and upload as they want.(I'm on ubuntu 20.04)
user avatar
0 votes
1 answer
52 views

How to use MPUT in PSFTP to put the file with permission 777?

I don't want to use chmod 777 *.xml so how I can use MPUT to put the file with permission 777? Without using chmod 777 *.xml the default file permission becomes 0664. This is my script dir lcd E:\...
user avatar
0 votes
0 answers
20 views

How to make each SFTP user unable to see each other's files with ChrootDirectory, but still allow Apache to serve files?

Let's say I'm giving SFTP access to 3 friends on my server: /friends/alice /friends/bob /friends/eve I'd like to prevent each user to list see each other's files. So an easy solution, ...
user avatar
  • 2,243
0 votes
1 answer
216 views

Connecting to SFTP with PcManFM

When I run pcmanfm 'sftp://user@machine', it gives me a 'Operation not supported' error. I think I'm just missing some software for mounting sftp connection into the file system, but I have no idea ...
user avatar
  • 103
0 votes
1 answer
66 views

Howto log multiple sftpd server's activity which user's chrooted home is on shared NFS?

I have an Ubuntu server with sftpd running where /var/data/chroot/ is an NFS mount from a remote central NFS server, and each sftpd user's chroot home is /var/data/chroot/<username>/ and every ...
user avatar
  • 31
0 votes
1 answer
98 views

sftp with chroot and file creation problem

I configured second sshd systemd service using own sshd configuration with different tcp port configured in it and following configuration of sftp subsystem: Match Group sftponly ChrootDirectory /...
user avatar
  • 2,537
0 votes
1 answer
70 views

RHEL 8 - OpenSSH - Use separate groups and ports to manage connections for SSH and sftp

All, I realize there are various posts out there that discuss how to configure different ports for ssh and sftp. What I cannot find much info is how to then manage these function with separate "...
user avatar
  • 101
0 votes
1 answer
55 views

Bitbucket Pipelines.yml is having issues with FTP

I have some code that I was using, sourced from samueldebruyn/debian-git. It's been working for months but all of a sudden is giving me an error of: + apt-get update Ign:1 http://security.debian.org/...
user avatar
0 votes
1 answer
49 views

setup sftp server with special permissions

I want to setup SFTP server with special permissions, and most importantly, how to set up the idea My idea: You access Via secure FTP protocol using Winscp, and you have your own folder, can upload ...
user avatar
0 votes
0 answers
1k views

Why does curl sftp fail with curl: (2) Failure establishing ssh session

This on a Raspberry Pi Model B Rev 1 Running Jessie. I am trying to eliminate all my .netrc files and set up all file transfers to my web host using public key authentication. It works for ssh: pi@...
user avatar
  • 75
0 votes
0 answers
26 views

Some Domain Users on SFTP do not auto start in the user home folder

I have a question regarding /etc/ssh/sshd_config: I have 2 users: importuser outportuser Both are domain users and are sharing 1 group, AD security group, sftp_uploaders And in /etc/ssh/sshd_config ...
user avatar
0 votes
0 answers
63 views

How to make chrooted SFTP home writable and default to "~"path

My current SFTP chroot setup is like this: User example is chrooted in directory /home/example/chroot/. He is unable to go up in directory tree (his unescapable root is /home/example). How to make ...
user avatar
  • 283
0 votes
0 answers
67 views

SFTP - check and copy recent files to local then archive within sftp

We have application integration layer over SFTP where the file feeds placed in SFTP server on random time interval like every 10 minute or 30 min interval and our need is to copy files from SFTP path ...
user avatar
-1 votes
2 answers
562 views

Meaning of the SFTP command

Could anyone help explain the parameters in the following SFTP command please? sftp://user:xx@test.com:22 This was used as part of the LFTP command of the source. What is the xx after the first :? Is ...
user avatar
  • 17
1 vote
1 answer
66 views

SFTP connection issue after 10 seconds

I'm trying to send files through SFTP by using the below script but after 10 seconds the SFTP connection closed and some files did not send without getting any errors. Script: #!/bin/sh HOST=xxx.xxx....
user avatar
0 votes
1 answer
489 views

How to configure sshd to have both ssh and sftp connection?

I have two Linux machines. One of them must be a sftp server. I added the following lines to /etc/ssh/sshd_config file: #SFTP server configuration ...
user avatar
2 votes
1 answer
165 views

SFTP Public Key Authentication works for one user and no others

I have one user who is able to able to login via SFTP using a public key, but can not setup any others to work the same way. I've searched for other similar questions and the solution has usually been ...
user avatar
0 votes
1 answer
38 views

Get all directories with only one specific file inside

I have a series of directories on a remote server (D1, D2, D3,...) and each directory contains multiple files (f1, f2, f3) with the same names. What I have on the remote Server: D1: f1, f2, f3 D2: f1,...
user avatar
  • 15
0 votes
0 answers
50 views

Can modify system files/folders via SSH, but not via SFTP

My problem I want to mount or access my Linux server's filesystem from my MacBook Pro. Some of the reasons for this include: Sometimes I edit files text files, but I want to be able to use standard ...
user avatar
1 vote
0 answers
105 views

Ubuntu sftp chroot jail on usb folder

I have a problem configuring the sftp chroot jail on ubuntu on a folder that is stored on a usb. I have a Toshiba 4tb external hard disk, that it's automounted via fstab on /sftp path. UUID={UUID} /...
user avatar
-1 votes
2 answers
202 views

SFTP isn't working anymore

Today I connected to sftp and it worked, but a few minutes later I got disconnected and couldn't connect again. Restarting sshd did nothing, so I rebooted the server and sftp started working again for ...
user avatar
  • 101
0 votes
0 answers
95 views

Unable to access SFTP server from Ubuntu machine

Unable to access SFTP server from Ubuntu machine and it keeps hanging on the connect line, but works from many machines. How to understand what could be causing this issue sftp -vvv -P 47722 foo@123....
user avatar
  • 101
-1 votes
1 answer
271 views

sshpass with sftp not working from crontab?

I have a ssh script (for testing purpose) that I can run successfully from cmd: #!/bin/bash /usr/bin/sshpass -p 'password' /usr/bin/sftp user@host:/out/test/ <<< $'put -r /data/test/*' A ./...
user avatar

1
2 3 4 5
12