We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I'm having trouble SSHing into a container. Here's a simplified example using ssh to localhost:
enroot import 'docker://nvcr.io#nvidia/pytorch:23.10-py3' && enroot create --name torch2310 nvidia+pytorch+23.10-py3.sqsh && enroot start --root --rw torch2310 /bin/bash -c 'cd ~ && mkdir -p ~/.ssh && apt update && apt install openssh-server sudo -y && echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && echo "AuthorizedKeysFile .ssh/authorized_keys" >> /etc/ssh/sshd_config && echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config && echo "LogLevel VERBOSE" >> /etc/ssh/sshd_config && echo "GatewayPorts yes" >> /etc/ssh/sshd_config && echo "Port 4444" >> /etc/ssh/sshd_config && service ssh restart && ssh-keygen -q -N "" -f /root/.ssh/id_rsa && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && ssh -o StrictHostKeyChecking=no -p 4444 localhost echo SUCCESS'
SSHing to localhost fails with the error message
Connection closed by 127.0.0.1 port 4444.
The same command runs successfully using a docker container
docker run --net=host -v --rm -it nvcr.io/nvidia/pytorch:23.10-py3 /bin/bash -c 'cd ~ && mkdir -p ~/.ssh && apt update && apt install openssh-server sudo -y && echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && echo "AuthorizedKeysFile .ssh/authorized_keys" >> /etc/ssh/sshd_config && echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config && echo "LogLevel VERBOSE" >> /etc/ssh/sshd_config && echo "GatewayPorts yes" >> /etc/ssh/sshd_config && echo "Port 4444" >> /etc/ssh/sshd_config && service ssh restart && ssh-keygen -q -N "" -f /root/.ssh/id_rsa && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && ssh -o StrictHostKeyChecking=no -p 4444 localhost echo SUCCESS'
Warning: Permanently added ‘[localhost]:4444’ (ECDSA) to the list of known hosts. SUCCESS
The text was updated successfully, but these errors were encountered:
See #92
Sorry, something went wrong.
No branches or pull requests
Hello,
I'm having trouble SSHing into a container. Here's a simplified example using ssh to localhost:
enroot import 'docker://nvcr.io#nvidia/pytorch:23.10-py3' && enroot create --name torch2310 nvidia+pytorch+23.10-py3.sqsh && enroot start --root --rw torch2310 /bin/bash -c 'cd ~ && mkdir -p ~/.ssh && apt update && apt install openssh-server sudo -y && echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && echo "AuthorizedKeysFile .ssh/authorized_keys" >> /etc/ssh/sshd_config && echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config && echo "LogLevel VERBOSE" >> /etc/ssh/sshd_config && echo "GatewayPorts yes" >> /etc/ssh/sshd_config && echo "Port 4444" >> /etc/ssh/sshd_config && service ssh restart && ssh-keygen -q -N "" -f /root/.ssh/id_rsa && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && ssh -o StrictHostKeyChecking=no -p 4444 localhost echo SUCCESS'
SSHing to localhost fails with the error message
The same command runs successfully using a docker container
docker run --net=host -v --rm -it nvcr.io/nvidia/pytorch:23.10-py3 /bin/bash -c 'cd ~ && mkdir -p ~/.ssh && apt update && apt install openssh-server sudo -y && echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && echo "AuthorizedKeysFile .ssh/authorized_keys" >> /etc/ssh/sshd_config && echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config && echo "LogLevel VERBOSE" >> /etc/ssh/sshd_config && echo "GatewayPorts yes" >> /etc/ssh/sshd_config && echo "Port 4444" >> /etc/ssh/sshd_config && service ssh restart && ssh-keygen -q -N "" -f /root/.ssh/id_rsa && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && ssh -o StrictHostKeyChecking=no -p 4444 localhost echo SUCCESS'
The text was updated successfully, but these errors were encountered: