Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ function create_keys() {
info "Creating host keys"
ssh-keygen -t ecdsa -f "$FOLDER_PATH/ssh_host_ecdsa_key" -q -P ""
ssh-keygen -t ed25519 -f "$FOLDER_PATH/ssh_host_ed25519_key" -q -P ""
if is_not_alinux; then
ssh-keygen -t rsa -f "$FOLDER_PATH/ssh_host_rsa_key" -q -P ""
fi
ssh-keygen -t rsa -f "$FOLDER_PATH/ssh_host_rsa_key" -q -P ""
if is_ubuntu; then
ssh-keygen -t dsa -f "$FOLDER_PATH/ssh_host_dsa_key" -q -P ""
fi
Expand All @@ -49,9 +47,7 @@ function import_keys() {
rm -f /etc/ssh/ssh_host_*
cp "$FOLDER_PATH/ssh_host_ecdsa"* /etc/ssh/
cp "$FOLDER_PATH/ssh_host_ed25519"* /etc/ssh/
if is_not_alinux; then
cp "$FOLDER_PATH/ssh_host_rsa"* /etc/ssh/
fi
cp "$FOLDER_PATH/ssh_host_rsa"* /etc/ssh/
if is_ubuntu; then
cp "$FOLDER_PATH/ssh_host_dsa"* /etc/ssh/
chown root:root /etc/ssh/ssh_host_*
Expand All @@ -63,13 +59,6 @@ function import_keys() {
chmod 644 /etc/ssh/ssh_host_*_key.pub
}

function is_not_alinux() {
if grep -q "Amazon" <<< "$OS"; then
return 1
fi
return 0
}

function is_ubuntu() {
if grep -q "Ubuntu" <<< "$OS"; then
return 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@
# See the License for the specific language governing permissions and limitations under the License.

keys_manager_script_dir = "/opt/parallelcluster/scripts/login_nodes"
key_types = %w(ecdsa ed25519)
is_not_amazon = !os_properties.amazon_family?
key_types = %w(ecdsa ed25519 rsa)
is_ubuntu = os_properties.ubuntu?
if is_not_amazon
key_types << 'rsa'
end
if is_ubuntu
key_types << 'dsa'
end
Expand Down