-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ssh configuration into base image.
And install the ssh-singleagent.sh script.
- Loading branch information
Showing
3 changed files
with
26 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# Make sure that the known_hosts file is present inside the .ssh folder. | ||
mkdir -p --mode=0700 /home/${NB_USER}/.ssh && \ | ||
touch /home/${NB_USER}/.ssh/known_hosts | ||
|
||
|
||
if [[ ! -f /home/${NB_USER}/.ssh/id_rsa ]]; then | ||
# Generate ssh key that works with `paramiko` | ||
# See: https://aiida.readthedocs.io/projects/aiida-core/en/latest/get_started/computers.html#remote-computer-requirements | ||
ssh-keygen -f /home/${NB_USER}/.ssh/id_rsa -t rsa -b 4096 -m PEM -N '' | ||
fi | ||
|
||
# Start the ssh-agent. | ||
eval `ssh-agent` |
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