forked from vrnetlab/vrnetlab
-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Description
root@r1:/# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 02:02 pts/0 00:00:01 python3 /launch.py --username clab --password clab@123 --hostname r1 --connection-mode tc --trace
About generic_vm, we can see the user and passwd is pre-defineded. can we read the user and passwd from clab yaml env parm?
env:
QEMU_SMP: 6
QEMU_MEMORY: 8192
USER: root
PASSWD: yt_xk39b
and Can we also set up passwordless SSH login at the same time?
like:
sshpass -p "$PASSWD" ssh-copy-id "$USER@$container"
chpasswd:
list: |
root: myrootpassword
clab: clab@123
expire: false
# Disable cloud-init for the subsequent boots
cfg_file.write("runcmd:\n")
runcmd:
- sed -i 's/^#*PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
- sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
- systemctl restart ssh
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels