Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
0answers
48 views

sshd_config - StrictModes option - bad to disable?

My use case is to have a shared account for webmasters (named as domain) but only one of the webmasters is "owner" of main data and defines who can loging to the shared account via editing ...
1
vote
0answers
35 views

Trouble setting up an sftp chroot jail

I'm following the SFTP chroot wiki on ArchWiki and finding a huge snag: I can't get my sftponly users authorized. Output of tail -2 /etc/passwd (my 2 users): chris:x:1001:1002::/home/jail:/usr/bin/...
1
vote
2answers
49 views

How to get sftp to respect my umask setting

I'm trying to get sftp to give me a umask of 002 but it keeps behaving like the umask is 022. How do I get it to do that? Red Hat 7.4 /etc/ssh/sshd_config has the line: Subsystem sftp internal-sftp ...
0
votes
1answer
43 views

use chroot to lock down sftp access without root owning folder

Everything I am reading says that for chroot to work with sftp root has to own the folder. I want to make it so a user can only sftp to a sub-directory in their home folder like /home/user/some/folder....
0
votes
1answer
34 views

AIX sftp to IBM sftp server using proxy fails

We have support server where would need to upload the snap data to IBM using proxy connection. We have already whitelisted the Server IP Address on the proxy side, Tried the ssh -J proxyjump option ...
0
votes
2answers
52 views

Authenticate with a private key

Is it possible to authenticate myself with the private key at the public key? The scenario: I gave another company the public key so that I can authenticate myself with my private key at the sftp ...
0
votes
1answer
19 views

Deny specific users in VSFTPD

I have Ubuntu 18.04 LTS with VSFTPD. I want to deny certain users from connection via SFTP to my server. So far I have only found Q&A (here on stackexchange and on the internet in general) ...
0
votes
1answer
65 views

How to keep the user “www-data” when modify file logged in as root?

I gave permission to the user "www-data" in the entire contents of the "/var/www" folder. However, I work with the root user with a private key via SFTP, and whenever I modify a file, the owner of ...
0
votes
0answers
48 views

sftp get not working as expected

I'm trying to download a folder from a remote server to my local server but I'm getting unexpected results. I used this to sftp: $ sftp -P [the_port] user@remote_ip this got me into the server. I ...
9
votes
1answer
134 views

sshfs: chroot all non-root users to specific directory

On a server I need unrestricted ssh access for root, and restricted for all other users. I would like to restrict all non-root users to: no ssh login only allow mount /mnt/data/ using sshfs I see ...
-1
votes
1answer
59 views

How consider home folder as root folder?

I create users who each have their own home directory, normal. Currently I create my user as follows: adduser -d / home / ftp / myUser myUser My users need to connect to SFTP (open ssh installed on ...
0
votes
1answer
37 views

Is there a way to trigger a script on sftp session exit?

I'm looking for a way to start a shell script after a sftp session exited. Is it possible to trigger /home/user/.bash_logout via sftp, how does it work? I tried to set RequestTTY force in ~/.ssh/...
1
vote
0answers
23 views

Unintentional bandwidth throttling — where else to look?

This is embarrassing, but I seem to have inadvertently set a persistent bandwidth throttle on SSH connections from my Ubuntu machine. When transferring files from a remote server via scp, sftp, or ...
0
votes
1answer
27 views

SFTP - give one user in SFTP Group special temporary access

I've set up a SFTP server and the group "sftponly" and they are all chrooted to the same dir. I'd like to give one of those user exclusive access to a specific folder for a short time. Can that be ...
1
vote
2answers
319 views

SFTP mget and get command to copy multiple folders or files to one server directory

I needed to copy multiple folders of same directory using one command. So I did this first, sftp >mget -r folder1 folder2 This command copied folder1 to the destination server but renamed it to ...
0
votes
0answers
62 views

QEMU: How to set up SSH File Exchange (SFTP) between Linux Host and Windows Guest?

Assumed I run a isolated virtual network bridge without public internet access (based on this solution): How can I set up a SFTP file exchange (e.g. via WinSCP) between guest machine and host machine ...
1
vote
2answers
148 views

How to get counts of the files present in remote directory using sftp command

I have a sftp server (Dbprd@101.102.130.23) .I am trying to connect to the below sftp server and search for the files which contains .txt in (/files/base/incomming) path and get the count of lines in ...
0
votes
1answer
44 views

Problem with SFTP on Arch-ARM

I have installed Arch ARM on a Raspberry Pi 3 and created a new user. Pretty much everything is working; I have copied my public/private keys and can ssh into Arch on the Raspberry Pi. NOTE I am only ...
1
vote
1answer
175 views

Using korn shell to compare local and remote MD5 over sftp

I am in need of creating and checking checksums between a local file, and the remote file I just pushed. If the MD5 checks, continue, else break. This needs to be in KORN shell scripting because we ...
1
vote
3answers
104 views

QEMU: Enable SFTP file exchange (guest ⇆ host) but prohibit guests access to public internet?

Assumed I run a Windows guest in a QEMU virtual machine on a Debian host. Hereby the Debian host is a common desktop computer with internet access. How can I set up a SFTP file exchange between guest ...
1
vote
0answers
183 views

How to use mobaxterm ssh/SFTP client with root files?

As I understood from How to use SFTP on a system that requires sudo for root access & ssh key based authentication? question there are not simple ways to use SFTP client with root stuff. I wish to ...
0
votes
0answers
22 views

Route Traffic coming on a port 1122 to SFTP port 22 without changing default SFTP port

I have a client server which doesn't allow outside communication through default 22 port for security reasons. But as per requirement, client needs to connect to my VM in global internet through SFTP ...
0
votes
1answer
36 views

Is there a way to log IP for FTP uploads in Redhat?

Is there a way to log which IP-address uploads files through sFTP in Redhat? The users sign in with SSH, so I can see their IP's in /var/log/secure. But is there a log for the built in sFTP-server, ...
0
votes
2answers
206 views

sshfs with on-demand mounting

I followed instructions for sshfs "on demand" mounting, but it doesn't work. I added this to /etc/fstab: username@hostname:/ /mnt/remotes/hostname fuse.sshfs noauto,x-systemd.automount,_netdev,users,...
1
vote
2answers
63 views

Transferring file from local computer to remote server

I would like to transfer a zip file from my local server to a remote server. I used the following command which contain host, port, and username as follows: scp "$somepath/${file}.zip" "$ftp_user"@"...
19
votes
2answers
3k views

Should I delete users' passwords once I set up public key authentication for SSH?

It's best to use public keys for SSH. So my sshd_config has PasswordAuthentication no. Some users never log in, e.g. a sftp user with shell /usr/sbin/nologin. Or a system account. So I can create ...
2
votes
1answer
85 views

How to enable up-arrow command history and command completion in sftp on Gentoo?

When I try to use up-arrow command history via sftp to my CentOS 7 server it just prints ASCII characters to the output instead of recalling recent commands: sftp> ^[[A It's very time consuming ...
1
vote
1answer
68 views

Is a Chroot Jail for SSH *and* SFTP?

I'm trying to setup a chroot jail, but I'm not sure how to make this work in SSH and SFTP. A quick question, will something like this work for both SSH and SFTP or just SSH? If it doesn't work for ...
1
vote
0answers
29 views

Command to download bunch of folders sharing generic names using sftp

I am running multiple codes in clusters creating multiple folders. I have some difficulties downloading them using the command get. Indeed what I use to do is to download folder by folder. Since the ...
2
votes
0answers
33 views

How to stop nginx sending status code partially written files to browsers? [closed]

I'm uploading video files to my Nginx server at /var/www/static. The files are sent from a separate machine. Sometimes these are large files, but are typically sent via an internal network. For ...
1
vote
0answers
44 views

Need to execute logic on sftp connection

I to execute the below logic after SFTP login. My source dir is on SFTP server and destDir is a Unix server path. I have all the text and JSON files on the SFTP folder and after execution of below ...
0
votes
0answers
22 views

How to restrict `sftp` & `scp` access only to the user's folder on CentOS? [duplicate]

I created a new user on my host, but when I enter SFTP using Filezilla, for example, I can access all folders from the host, even the root user. Is there any way I can limit access from SFTP and scp ...
0
votes
0answers
23 views

Centos7 - Create user for SFTP access

In a CentOS7 how can i create a new user and give him sftp access to a specific directory? I followed this tutorial How to create FTP user with specific directory access in 7 easy steps to create the ...
0
votes
0answers
32 views

sftp to another server, don't need password [duplicate]

Pretty new at writing ksh scripts for Unix. Need to move a file from one internal server to another internal server. File produced on Unix side and needs to be moved via SFTP. The key is copied ...
1
vote
0answers
91 views

Connecting to Linux Server through WinSCP in SSIS [closed]

We have SSIS and Hive servers on 2 different environments. Hive Server lives on Linux box. The objective of building SSIS package is to download certain files from Hive box through Hive scripts, ...
0
votes
1answer
639 views

SFTP not logging to /var/log/sftp.log

This article (Setting up logging for chroot users) is the only one that has helped me to get logging working for chroot'd sftp users, so huge thanks for that! However, for some reason, my logs ...
1
vote
1answer
113 views

Temporary SSH access for SFTP

I have a home server which hosts shared files to a set of users. When adding new users I have (in the past) set up user accounts which belong to an 'SFTP only' group that chroots them to the shared ...
1
vote
1answer
360 views

How to configure SSH with a RemoteCommand only for interactive sessions (i.e. without command, or not sftp)

Currently I use Fish as my main shell on local and remote hosts. I connect to remote hosts via ssh and sftp. I wanted to open or reuse a remote tmux whenever I connect, automatically, by default; so ...
0
votes
1answer
2k views

How solve error with sftp: Couldn't read packet: Connection reset by peer?

I did install sftp on CentOS and did add new group: groupadd sftp did create new user: useradd -m sftp_user_1 -s /sbin/nologin -g sftp did create password: passwd sftp_user_1 did change owner: ...
0
votes
1answer
188 views

Will setting user shell to nologin prevent them from accessing SFTP?

I have a user that has their shell set to nologin, or actually a different binary "noshell" provided by cPanel. whatever the case, I want to know if setting their shell this way is enough to prevent ...
0
votes
0answers
69 views

Read crontab from remote machine

I need to read the crontab file of a shared user on a remote machine. I cannot SSH directly to that user, but rather SSH to my private user and then run sudo -iu <shared user>, so I can't ...
0
votes
0answers
382 views

Is SFTP/FTP file upload size configurable in Linux?

I have a number of Quartz timers, which run monthly, generate csv files and upload it to my server using ftp & sftp (on different machines) protocols. This was working all good for me until last ...
1
vote
1answer
190 views

Debian 9 (Stretch): How to create SFTP file exchange between various machines?

Imagine the following setup: Two laptops: Let's call them [laptop A] and [laptop B]. Each laptop has the same operating system installed (Debian 9 Stretch) Each laptop has openssh-server installed ...
0
votes
0answers
12 views

Send emails on download of file from server

My company's ERP server stores backups of code, database, and files (identification documents) uploaded to server. I would like to make a script that detects sftp file transfer from server to the user ...
0
votes
0answers
48 views

Red Hat: How to sftp upload and git push with 755/644 and apache:apache rights/owner?

I have apache web server, linux, ssh access with sudo. And many troubles with editing, uploading, pushing, committing there. Because there are set 755 for dirs, 644 for files, and apache:apache owner ...
1
vote
1answer
465 views

Why is umask ignored when uploading files over sftp?

Have a wierd issue with permissions on files uploaded to a remote system. Locally, the file index2.html is chmod 664: acoder@acoder-local ~ $ ll index2.html -rw-rw-r-- 1 acoder acoder 29 May ...
2
votes
4answers
2k views

Sharing SSH Keys to login?

I am little bit lost or confused. I have some secure server where inside ~/.ssh/authorized_keys i have a key to remotely login those servers from my desktop (mac book ) Now that secure server need ...
0
votes
1answer
1k views

upload to sftp batch mode

I need to upload files to an SFTP server as part of an automated pipeline process (so can not be interactive). I do not have ssh access so I can not use scp or rsync. I have had some success using ...
0
votes
1answer
33 views

sftp real time warning in solaris

Suppose I have two solaris servers, A and B, and I am connecting from one server to another using sftp. Suppose B tries to connect to A using SFTP. Then How to detect in A the sftp request sent by ...
0
votes
1answer
425 views

Duplicity - save backup to multiple destinations

Is it possible to configure duplicity to save the generated backup to multiple destinations without doing the whole backup process twice? Something like duplicty --full --volsize 1024 -v5 sftp://user@...