linux:ssh_scp
This is an old revision of the document!
Table of Contents
SSH und SCP
SSH
SCP
Script um Public-Key Hinzuzufügen
#!/bin/sh mkdir /etc/skel/.ssh useradd -m -s /bin/bash local_admin-grunwald echo "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAp+i1MhaHDsz8WeHvRohWezjoSYCeNNTB4agYP7ZpxiNIspVScHvyErb0YcGFR5vZypy3kETT9HcQKicRdmMIT6GPAOSPDIASDjdfgdjfASDFBz7kZkzgSisifgoeifqIwPbQbPHeR4yLJreXnbGR4xlifkeM5RoogbD5cvLgdwy78aiKPNZMhCheUd4G8srZQUPdGe+TuW8XdFVdzKEhqqNPZSyulHTy6QASJKDHGWEUDFGWZEFWKUEFHZWEIFHWEFBhsdfhsdfgautvG7GQ6mFn+U/u4PxNmmL5RVgdSFoW8J28ePJl6ckFWMi8yLXcZC+01w== local_admin-grunwald" > /home/local_admin-grunwald/.ssh/authorized_keys cp /etc/sudoers /etc/sudoers.orig echo "local_admin-grunwald ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers cp /etc/ssh/sshd_config /etc/ssh/sshd_config.orig grep "PasswordAuthentication yes" /etc/ssh/sshd_config | sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/g' /etc/ssh/sshd_config grep "PermitRootLogin yes" /etc/ssh/sshd_config | sed -i 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config service ssh restart
~~DISQUS~~
linux/ssh_scp.1605828424.txt.gz · Last modified: 2024/02/17 19:03 (external edit)