-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Stocard/tests
Adds test setup and first tests
- Loading branch information
Showing
14 changed files
with
514 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM stocard/node:8.11 | ||
COPY ./package.json ./package.json | ||
COPY ./yarn.lock ./yarn.lock | ||
RUN yarn install --silent --frozen-lockfile | ||
|
||
COPY ./tsconfig.json ./ | ||
COPY ./tslint.json ./ | ||
COPY ./src ./src | ||
RUN yarn build | ||
|
||
# adds the ssh keys | ||
COPY ./test/keys /root/.ssh/ | ||
|
||
# add the non protected key as the standard key | ||
COPY ./test/keys/id_rsa_no_pass /root/.ssh/id_rsa | ||
COPY ./test/keys/id_rsa_no_pass.pub /root/.ssh/id_rsa.pub | ||
|
||
|
||
# COPY ./dist ./dist | ||
COPY ./test ./test | ||
|
||
|
||
CMD ["yarn", "test"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: "3.2" | ||
services: | ||
server: | ||
ports: | ||
- 22:22 | ||
build: | ||
context: ./ | ||
dockerfile: ./server/Dockerfile | ||
|
||
tester: | ||
build: | ||
context: ../ | ||
dockerfile: ./test/client/Dockerfile | ||
depends_on: | ||
- server | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCVZhjIJ/qfg1i8QsIbn6Vhhvh0OqSFrCK7837F2KuIhoIzP0MtqnL+Mxmg7/TxEh5KvZUWtVRoZsfdgG9aUtgb8YE1fCghJPmXqR2KKbWCVmSCm3BCmGJ0RbscUVOIZ+8aQKWSqZk6M7Bykvxc0HOdJzyMqrcT6cUhYKG0NJRRUysga+D3Bfnhwz7rieAb7C7v+dQhaJGmfXLQpC27/F5rGh5REVv44S4C+FcL2Wl6Gl9Cjjtcr/fc5jd0DfEE4o4rhC80/DjemBo67Qg63S6e1Cmdp8Y9PB5UgveqBNIwZCDzRGNimmD1aFor86oF4U0CkYHSb2lvoHZpV6g+XY6dZ5NhSib7OrM7LgB80RiO6hEbiPc2T8B1VL+R6G++KXc5z9ZOAgdWCCPirLWMF8RXhxiFJ/OnAyWBZsL9Q4j/pOtBWndZqBVLpaf4ko3yT/kxKVw8NcV8EHn6N9NFzIiQzlIG9B2QQ/Se0sLTcPBDGHqL8oGN1+I9Bv2Um5jnmmwTJO4+DDRvknuFsjpr7eYAZXdPLpyVIDLkA8PdbhgOzosofRmX9rokDac+kLxfaRl+C35+cto/orHaqR7XHs0LOe7Wg8TlO46VbFuMPG98pQBP+GUP440TY8U/vj9aIBD/BY9QJJAhgbF16D2CUTM95VA4I9ZZyFHyKwRZHF2vpw== [email protected] | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDf/1Fs4Fr8Y/1PA4pDnTSMOG6Af//L5wQJAKleW5lA5+OUiqkYwudM9z/e5pD3/jGKtYNuAr7PUnGNbAsSy73ac5APPyHYxl9fv39ZEXrGvVOX8tAsQa0LvuQeEaVWqDoKoNlbFMIvZuDuYdwc5UB47ykX9OY+3roA1yhbCY54Ts2xYVzGYzFUtNr2ctg0h8veB05zZIE2XCNC3tycdR7KCGFb9cemDXxaFA3YVpNMq1ui3U1pFpNEiCSFmIzaMlIX2nOcHBW7b7DvAybzuNz114ymkB9cvH4IX9+ci1h3yu7oTTVR5bnyq2/wGlSmZzCdD2WIy2hZXd4AELWDdE3GgMCOMjQDhHkdfkROBdTODSKL5E6Wsw2XeKZq8lPZgUYBM2Q3hL1ans/5zO5llXRxl/KmrJMgMwRGnNuup3rPi5faw21BYc07hEo+Z/idvJS8iGOuxb+p0cQh072L9vh1zpUVxVenzdDuxHRRYzRl6qk2kvEQtjoHZlnRG//emi/jk1ULNO5qd4+YhHllMIxYDlJwndEW7GQoEmCsVX/YNgLizCquFee8wj1NSoE0qXTiHMaOY2Bw6RYYSXr0/+fGk6dM8LY7OQHW13A5CgyE9OoHd39LiuE6mvAmbt+PpNWLBLVMi2QQd2xOXFvOVrTDUQXHr9RHbi2TBNMoVgVZVw== [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIIJKAIBAAKCAgEAlWYYyCf6n4NYvELCG5+lYYb4dDqkhawiu/N+xdiriIaCMz9D | ||
Lapy/jMZoO/08RIeSr2VFrVUaGbH3YBvWlLYG/GBNXwoIST5l6kdiim1glZkgptw | ||
QphidEW7HFFTiGfvGkClkqmZOjOwcpL8XNBznSc8jKq3E+nFIWChtDSUUVMrIGvg | ||
9wX54cM+64ngG+wu7/nUIWiRpn1y0KQtu/xeaxoeURFb+OEuAvhXC9lpehpfQo47 | ||
XK/33OY3dA3xBOKOK4QvNPw43pgaOu0IOt0untQpnafGPTweVIL3qgTSMGQg80Rj | ||
Yppg9WhaK/OqBeFNApGB0m9pb6B2aVeoPl2OnWeTYUom+zqzOy4AfNEYjuoRG4j3 | ||
N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N2zz7mBMOYcjH95DgeETY/50waYpPCMYf9wq+hjOydPb | ||
TdPRaQKCAQApsV+WsiU2l0VEHFqe2Kgw1byOGsHOU45VymoE2iCI5fkWt637B+L0 | ||
fmWmUDfXAHWGFMg+SihxoDrFsOWP7HLLC8uVp5xiMMiQkZsmp3l8M51zWtWuzTY+ | ||
soEmpt03cmWaORT22ILsajCd021kEKtTtRsrZYbeNklyaNlTOuWl1bCnv9LlumwI | ||
bCg+xBEIiOrujBpQf0UKrhaf67pPbr9I0xA3AZIaEye4Ypp6Vg3XK9b0jOSx/mdo | ||
uSV1OaUU5e1Lz7iHcQ6lMkC73A4gs2FDZ8KpXEpRA/0JWMffbTH9EWUumKfrX3vI | ||
SkU0xSB9m55pztTQ0a3c06kVXcAR9sq/AoIBAGJdj0zSwHsHHnDLiVxj05hWC7B1 | ||
2LCDSyAUshZRNMyEFhJq+hpBlyuGlqJfEsLKq9jskbsRjZ/vk6j7YDVKQOBk6EiL | ||
hvufe8Dr7bEY0Wn6z/I8hEpGww+2KarZQqh2ketPi/EQIQh1xOVZRApFbd/0Bbmu | ||
UWavJMP+Ddxc5rOXYeehqQxYX5+9wRmCkv78GLvQhJM5Mwi5G6KmSqOM3aEYxxks | ||
W2ERnTXOVN++0e/9zcVwaSRe1ov8xoKQwANt/OeFfi4dsogDvh4pqKNVetDkPawh | ||
tHkyDeVNyDnAVV4Huv8JWd4120vGEOrMzQk6r2TTscYQp7Xe5W6KBqeKO8o= | ||
-----END RSA PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCVZhjIJ/qfg1i8QsIbn6Vhhvh0OqSFrCK7837F2KuIhoIzP0MtqnL+Mxmg7/TxEh5KvZUWtVRoZsfdgG9aUtgb8YE1fCghJPmXqR2KKbWCVmSCm3BCmGJ0RbscUVOIZ+8aQKWSqZk6M7Bykvxc0HOdJzyMqrcT6cUhYKG0NJRRUysga+D3Bfnhwz7rieAb7C7v+dQhaJGmfXLQpC27/F5rGh5REVv44S4C+FcL2Wl6Gl9Cjjtcr/fc5jd0DfEE4o4rhC80/DjemBo67Qg63S6e1Cmdp8Y9PB5UgveqBNIwZCDzRGNimmD1aFor86oF4U0CkYHSb2lvoHZpV6g+XY6dZ5NhSib7OrM7LgB80RiO6hEbiPc2T8B1VL+R6G++KXc5z9ZOAgdWCCPirLWMF8RXhxiFJ/OnAyWBZsL9Q4j/pOtBWndZqBVLpaf4ko3yT/kxKVw8NcV8EHn6N9NFzIiQzlIG9B2QQ/Se0sLTcPBDGHqL8oGN1+I9Bv2Um5jnmmwTJO4+DDRvknuFsjpr7eYAZXdPLpyVIDLkA8PdbhgOzosofRmX9rokDac+kLxfaRl+C35+cto/orHaqR7XHs0LOe7Wg8TlO46VbFuMPG98pQBP+GUP440TY8U/vj9aIBD/BY9QJJAhgbF16D2CUTM95VA4I9ZZyFHyKwRZHF2vpw== [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
Proc-Type: 4,ENCRYPTED | ||
DEK-Info: AES-128-CBC,20EBEBDAEF502087A268D86E4697C64B | ||
|
||
UK+Jp2ZdWXfIMjH3CImKj4ugc9qc8nJe49Us02uTRNa7KyI7IcyZ2gj6copRxvGI | ||
YcZhW0hWfHowWskXgfPP5uZDRmoTumPwQXN5FMfqDo5/arNB2ZeyAE4BdH3CGg5D | ||
9ISinD1S/T/MsEoh5xFhNSvWG9xaHuWPBNQXuqxX/H7PYOF7LJkgUZW9nXRxJEpz | ||
FifuR93n50VYu8nSuWEYod/mCiWC+Cx7We1g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||
ebddws4duFe1EdwqfkSUT0AjGR0g32rpLF1lPMFdmdJ+YcZeISWD56IKq4LBC99n | ||
z4hnX08p/1rPhoji9ROrlLLptOjlkwjoyNZkboYfQ2gPauM+MSAywBADTqiDKGif | ||
UL/oZ+asgoGLL6R2rKVM2dzNjZR+y79sd5iGR7ppUxxFBT/GhWZyv5G93P5CFIbk | ||
35acus7t/2+zuMXD36gSYKf/aAVOime8VNLv8PeasOEUdTnTdDxF31iEmZfWT9KE | ||
6b5ceyPjlrfiDs4K7/UHEI+EWngFAEIMacCPyE3VOHNESevKoPvkN6ys4iYX4t7J | ||
dDqC9sNEsIrn3QSziydz4rttBHBzuZw1xVe3tmPRrTgkIK0Jh6YMNQWSuZuVLWEf | ||
REaky1JEzGoyoErIxTRjwhanJQD4sdZiwe+YPBJEHCUCMK7llnBCsT4rPgN+5yQ4 | ||
7tmJdWwKr9GLXJyykhmIGqPy52hH6x/DwDTMmFuGE+JFsjPAx+1AeEx+Mv8eBOI/ | ||
oR5Nz+136FtvC50rRShDnBjgLqEH74CJZWmfKUwInKXCzYzEs9akeIfsDkRMixuY | ||
nODRZfNFvkLYftUEuMjrJhYVKxuuSjYT3NB/oAKUfdr0Cbz0HGN6f7pBMXDnwdA4 | ||
ogbIAVhP9SoHrlpV1DwqFdnIfTrXsc5zOFq7GZ8k/EjXxKb7I/YMKeVpxItGcHNF | ||
S0VRUhSEa9qpkkGINoYCW0frYFfB/LsIMZDTKuPt9BxHOt53TSy9Mrw1S/ypBZP2 | ||
04MLHRSsrrDzI+Z2IWKQvHaCc38hlIt4B2VeiWxFErheyBoA9EQeTip3qh457TgV | ||
ik3dmZ/Mc9QFGbZhQEOVAuF3PR6ppvFXp2MWe2IyHEVRAWpV02vU9D95CiMiLmmi | ||
-----END RSA PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDf/1Fs4Fr8Y/1PA4pDnTSMOG6Af//L5wQJAKleW5lA5+OUiqkYwudM9z/e5pD3/jGKtYNuAr7PUnGNbAsSy73ac5APPyHYxl9fv39ZEXrGvVOX8tAsQa0LvuQeEaVWqDoKoNlbFMIvZuDuYdwc5UB47ykX9OY+3roA1yhbCY54Ts2xYVzGYzFUtNr2ctg0h8veB05zZIE2XCNC3tycdR7KCGFb9cemDXxaFA3YVpNMq1ui3U1pFpNEiCSFmIzaMlIX2nOcHBW7b7DvAybzuNz114ymkB9cvH4IX9+ci1h3yu7oTTVR5bnyq2/wGlSmZzCdD2WIy2hZXd4AELWDdE3GgMCOMjQDhHkdfkROBdTODSKL5E6Wsw2XeKZq8lPZgUYBM2Q3hL1ans/5zO5llXRxl/KmrJMgMwRGnNuup3rPi5faw21BYc07hEo+Z/idvJS8iGOuxb+p0cQh072L9vh1zpUVxVenzdDuxHRRYzRl6qk2kvEQtjoHZlnRG//emi/jk1ULNO5qd4+YhHllMIxYDlJwndEW7GQoEmCsVX/YNgLizCquFee8wj1NSoE0qXTiHMaOY2Bw6RYYSXr0/+fGk6dM8LY7OQHW13A5CgyE9OoHd39LiuE6mvAmbt+PpNWLBLVMi2QQd2xOXFvOVrTDUQXHr9RHbi2TBNMoVgVZVw== [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update | ||
RUN apt-get -yq install openssh-server; \ | ||
mkdir -p /var/run/sshd; \ | ||
mkdir /root/.ssh && chmod 700 /root/.ssh; \ | ||
touch /root/.ssh/authorized_keys | ||
|
||
COPY ./server/sshd_config /etc/ssh/sshd_config | ||
|
||
|
||
COPY ./keys/authorized_keys /root/.ssh/authorized_keys | ||
|
||
|
||
EXPOSE 22 | ||
CMD /usr/sbin/sshd -D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# What ports, IPs and protocols we listen for | ||
Port 22 | ||
# Use these options to restrict which interfaces/protocols sshd will bind to | ||
#ListenAddress :: | ||
#ListenAddress 0.0.0.0 | ||
Protocol 2 | ||
# HostKeys for protocol version 2 | ||
HostKey /etc/ssh/ssh_host_rsa_key | ||
HostKey /etc/ssh/ssh_host_dsa_key | ||
HostKey /etc/ssh/ssh_host_ecdsa_key | ||
HostKey /etc/ssh/ssh_host_ed25519_key | ||
#Privilege Separation is turned on for security | ||
UsePrivilegeSeparation yes | ||
|
||
# Lifetime and size of ephemeral version 1 server key | ||
KeyRegenerationInterval 3600 | ||
ServerKeyBits 1024 | ||
|
||
# Logging | ||
SyslogFacility AUTH | ||
LogLevel INFO | ||
|
||
# Authentication: | ||
LoginGraceTime 120 | ||
PermitRootLogin without-password | ||
StrictModes yes | ||
|
||
RSAAuthentication yes | ||
PubkeyAuthentication yes | ||
#AuthorizedKeysFile %h/.ssh/authorized_keys | ||
|
||
# Don't read the user's ~/.rhosts and ~/.shosts files | ||
IgnoreRhosts yes | ||
# For this to work you will also need host keys in /etc/ssh_known_hosts | ||
RhostsRSAAuthentication no | ||
# similar for protocol version 2 | ||
HostbasedAuthentication no | ||
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication | ||
#IgnoreUserKnownHosts yes | ||
|
||
# To enable empty passwords, change to yes (NOT RECOMMENDED) | ||
PermitEmptyPasswords no | ||
|
||
# Change to yes to enable challenge-response passwords (beware issues with | ||
# some PAM modules and threads) | ||
ChallengeResponseAuthentication no | ||
|
||
# Change to no to disable tunnelled clear text passwords | ||
PasswordAuthentication no | ||
|
||
# Kerberos options | ||
#KerberosAuthentication no | ||
#KerberosGetAFSToken no | ||
#KerberosOrLocalPasswd yes | ||
#KerberosTicketCleanup yes | ||
|
||
# GSSAPI options | ||
#GSSAPIAuthentication no | ||
#GSSAPICleanupCredentials yes | ||
|
||
X11Forwarding yes | ||
X11DisplayOffset 10 | ||
PrintMotd no | ||
PrintLastLog yes | ||
TCPKeepAlive yes | ||
#UseLogin no | ||
|
||
#MaxStartups 10:30:60 | ||
#Banner /etc/issue.net | ||
|
||
# Allow client to pass locale environment variables | ||
AcceptEnv LANG LC_* | ||
|
||
Subsystem sftp /usr/lib/openssh/sftp-server | ||
|
||
# Set this to 'yes' to enable PAM authentication, account processing, | ||
# and session processing. If this is enabled, PAM authentication will | ||
# be allowed through the ChallengeResponseAuthentication and | ||
# PasswordAuthentication. Depending on your PAM configuration, | ||
# PAM authentication via ChallengeResponseAuthentication may bypass | ||
# the setting of "PermitRootLogin without-password". | ||
# If you just want the PAM account and session checks to run without | ||
# PAM authentication, then enable this but set PasswordAuthentication | ||
# and ChallengeResponseAuthentication to 'no'. | ||
UsePAM yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
directory=$(pwd) | ||
if [[ $directory == *"/test" ]]; then | ||
cd .. | ||
fi | ||
|
||
docker-compose -f ./test/docker-compose.yml build | ||
docker-compose -f ./test/docker-compose.yml up --force-recreate --abort-on-container-exit | ||
|
||
CODE=0 | ||
docker-compose --file=./test/docker-compose.yml ps -q | xargs docker inspect -f '{{ .State.ExitCode }}' | while read code; do | ||
if [ "$code" == "1" ]; then | ||
CODE=-1 | ||
fi | ||
done | ||
docker-compose -f ./test/docker-compose.yml down | ||
exit $CODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { SSHConnection } from '../dist/Connection' | ||
import * as fs from 'fs' | ||
|
||
describe('node-ssh-forward', async () => { | ||
describe('Connect to a server', async () => { | ||
it('with default path to the private key', async () => { | ||
const ssh = new SSHConnection({ | ||
username: 'root', | ||
endHost: 'server' | ||
}) | ||
await ssh.executeCommand('uptime') | ||
}) | ||
it.skip('with default path to the private key and ssh agent enabled ', async () => { | ||
const ssh = new SSHConnection({ | ||
username: 'root', | ||
endHost: 'server', | ||
agentForward: true | ||
}) | ||
await ssh.executeCommand('uptime') | ||
}) | ||
it('with custom path to the private key', async () => { | ||
const ssh = new SSHConnection({ | ||
username: 'root', | ||
endHost: 'server', | ||
privateKey: fs.readFileSync(`${__dirname}/keys/id_rsa_no_pass`), | ||
}) | ||
await ssh.executeCommand('uptime') | ||
}) | ||
it('with a passphrase protected private key', async () => { | ||
const ssh = new SSHConnection({ | ||
username: 'root', | ||
endHost: 'server', | ||
privateKey: fs.readFileSync(`${__dirname}/keys/id_rsa_pass`), | ||
passphrase: 'passphrase' | ||
}) | ||
await ssh.executeCommand('uptime') | ||
}) | ||
}) | ||
}) |
Oops, something went wrong.