0

First this is not a duplicate of any thread ive gone thru all of them and either solutions were not working for OPs or they werent working for me.

I want to allow specific user to use my ssh server running openssh without being authenticated. No password and no keys.

User has no shell access to the system. User will use the server as socks proxy.

Ive gone thru all methods described in related threads and ssh server either is wants publickey or asks for password which user doesnt have from birth.

my sshd_config at this moment with all deleted matches for user. With this setup only users who have keys and whos keys were added in authorized_keys list have access to the server.

Include /etc/ssh/sshd_config.d/*.conf

# Port and ListenAddress options are not used when sshd is socket-activated,
# which is now the default in Ubuntu.  See sshd_config(5) and
# /usr/share/doc/openssh-server/README.Debian.gz for details.
Port 22000
Protocol 2
AddressFamily inet
ListenAddress 0.0.0.0

#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

LoginGraceTime 30
PermitRootLogin no
StrictModes yes
MaxAuthTries 300
MaxSessions 100

PubkeyAuthentication yes

# Expect .ssh/authorized_keys2 to be disregarded by default in future.
AuthorizedKeysFile      .ssh/authorized_keys .ssh/authorized_keys2

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
KbdInteractiveAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the KbdInteractiveAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via KbdInteractiveAuthentication may bypass
# the setting of "PermitRootLogin prohibit-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and KbdInteractiveAuthentication to 'no'.
UsePAM no

AllowAgentForwarding yes
AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
PrintLastLog no
#TCPKeepAlive yes
PermitUserEnvironment yes
Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
PermitTunnel yes
#ChrootDirectory none
#VersionAddendum none

# no default banner path
Banner /home/plutus/Documents/banner.txt

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem       sftp    /usr/lib/openssh/sftp-server
6
  • Have you considered running an actual "socks proxy" outside of SSH?
    – Daniel T
    Commented Mar 3 at 3:08
  • @DanielT no ... mostly I want to understand why I cant allow user to get thru without authentication. Commented Mar 3 at 3:11
  • 1
    Your PermitEmptyPasswords value is incorrect if you have created a user account with a blank password.
    – matigo
    Commented Mar 3 at 5:25
  • @matigo PermitEmptyPassword does absolutely nothing when user is created without a password. Ive tried switching it to yes but still was getting public key error then i disabled pam and publickey authentication method leaving only password authentication and switching emptypasswords to yes and at that time it was keep asking for password even tho there is no password for that account assigned. Commented Mar 3 at 5:41
  • 1
    Why? This seems like a really bad idea
    – moo
    Commented Mar 3 at 6:19

0

You must log in to answer this question.

Browse other questions tagged .