Skip to content

Commit 66056e6

Browse files
author
Sam Dodrill
committed
fix(builder): disallow password authentication
Ref: #1340 Replaces the previous password prompt with an error message similar to: kamina ~/tmp/deis/example-go (git:master) ✔ ❯❯❯ git push deis master Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Ideally we would brand this with a Deis-centric message, but for now this should be good enough until we overhaul the builder completely.
1 parent e44dc1f commit 66056e6

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

builder/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ CMD ["/app/bin/boot"]
4848
EXPOSE 22
4949

5050
ADD . /app
51+
ADD sshd_config /etc/ssh/sshd_config
5152
RUN chown -R root:root /app

builder/sshd_config

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Port 22
2+
Protocol 2
3+
HostKey /etc/ssh/ssh_host_rsa_key
4+
HostKey /etc/ssh/ssh_host_dsa_key
5+
HostKey /etc/ssh/ssh_host_ecdsa_key
6+
UsePrivilegeSeparation yes
7+
KeyRegenerationInterval 3600
8+
ServerKeyBits 768
9+
SyslogFacility AUTH
10+
LogLevel INFO
11+
LoginGraceTime 120
12+
PermitRootLogin yes
13+
StrictModes yes
14+
RSAAuthentication yes
15+
PubkeyAuthentication yes
16+
IgnoreRhosts yes
17+
RhostsRSAAuthentication no
18+
HostbasedAuthentication no
19+
PermitEmptyPasswords no
20+
ChallengeResponseAuthentication no
21+
PasswordAuthentication no
22+
X11Forwarding no
23+
X11DisplayOffset 10
24+
PrintMotd no
25+
PrintLastLog yes
26+
TCPKeepAlive yes
27+
AcceptEnv LANG LC_*
28+
Subsystem sftp /usr/lib/openssh/sftp-server
29+
UsePAM yes

0 commit comments

Comments
 (0)