Get your free beta license ↗
FTP, SFTP and SSH · OpenSSH

SSH answers “This service allows sftp connections only.”

Last updated 30 Nov 2026
Summary

A customer's SSH login prints This service allows sftp connections only. and closes. OpenSSH gives the customer SFTP access only until an administrator enables shell access.

Symptoms

An SSH login as the customer prints the following message and closes.

Output
This service allows sftp connections only.

With ssh -t, the login prints PTY allocation request failed on channel 0 instead. SFTP works with the same login and password.

Cause

A customer gets a shell when an administrator enables it. Until then, sshd runs only SFTP for that customer, confines them to their home folder, and gives them no terminal.

Resolution

  1. Give the customer a shell.

    urbestack-user-set --name USER --shell on
  2. Check the customer's login shell.

    getent passwd USER
  3. The entry shows /bin/bash as the login shell, and the customer can log in over SSH.

  4. Use --shell off to remove shell access again. Both settings leave the files on disk intact.