Skip to content

Commit ddeb592

Browse files
Password SSH adjustment + CUDA Filter Warning (#346)
Co-authored-by: Mo King <muhsinking@gmail.com>
1 parent 19e0ff1 commit ddeb592

File tree

5 files changed

+27
-162
lines changed

5 files changed

+27
-162
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ helpers/__pycache__/** */
2929
# Webstorm
3030
.idea/*
3131

32-
CLAUDE.md
32+
CLAUDE.md
33+
/.mintlify-last

docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@
206206
{
207207
"group": "Troubleshooting",
208208
"pages": [
209+
"references/troubleshooting/cuda-version-issue",
209210
"references/troubleshooting/leaked-api-keys",
210211
"references/troubleshooting/storage-full",
211212
"references/troubleshooting/troubleshooting-502-errors",
87.7 KB
Loading

pods/configuration/use-ssh.mdx

Lines changed: 6 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -129,165 +129,10 @@ Here are some common reasons why this might happen:
129129
## Password-based SSH
130130
To use this method, your Pod must have a public IP address and expose TCP port 22. SSH will be accessible through a mapped external port.
131131

132-
To quickly set up password-based SSH, copy and paste this code into your Pod's web terminal:
133-
134-
```bash expandable Password-based SSH Script
135-
cat > /tmp/setup_ssh.sh << 'EOF' && chmod +x /tmp/setup_ssh.sh && /tmp/setup_ssh.sh
136-
#!/bin/bash
137-
138-
# Function to print in color
139-
print_color() {
140-
COLOR=$1
141-
TEXT=$2
142-
case $COLOR in
143-
"green") echo -e "\e[32m$TEXT\e[0m" ;;
144-
"red") echo -e "\e[31m$TEXT\e[0m" ;;
145-
"yellow") echo -e "\e[33m$TEXT\e[0m" ;;
146-
"blue") echo -e "\e[34m$TEXT\e[0m" ;;
147-
*) echo "$TEXT" ;;
148-
esac
149-
}
150-
151-
# Function to prompt for password
152-
get_password() {
153-
while true; do
154-
print_color "blue" "Enter a password for root user:"
155-
read -s root_password
156-
echo
157-
158-
print_color "blue" "Confirm password:"
159-
read -s confirm_password
160-
echo
161-
162-
if [ "$root_password" = "$confirm_password" ]; then
163-
print_color "green" "Password confirmed successfully."
164-
break
165-
else
166-
print_color "red" "Passwords do not match. Please try again."
167-
fi
168-
done
169-
}
170-
171-
# Check for OS Type
172-
print_color "blue" "Detecting Linux Distribution..."
173-
os_info=$(cat /etc/*release)
174-
print_color "yellow" "OS Detected: $os_info"
175-
176-
# Check for SSH Server and install if necessary
177-
if ! command -v sshd >/dev/null; then
178-
print_color "yellow" "SSH server not found. Installing..."
179-
if [[ $os_info == *"debian"* || $os_info == *"ubuntu"* ]]; then
180-
apt-get update && apt-get install -y openssh-server
181-
elif [[ $os_info == *"redhat"* || $os_info == *"centos"* ]]; then
182-
yum install -y openssh-server
183-
else
184-
print_color "red" "Unsupported Linux distribution for automatic SSH installation."
185-
exit 1
186-
fi
187-
print_color "green" "SSH Server Installed Successfully."
188-
else
189-
print_color "green" "SSH Server is already installed."
190-
fi
191-
192-
# Configure SSH to allow root login
193-
print_color "blue" "Configuring SSH to allow root login with a password..."
194-
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
195-
sed -i 's/#PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
196-
service ssh restart
197-
print_color "green" "SSH Configuration Updated."
198-
199-
# Get custom password from user
200-
get_password
201-
202-
# Set the custom password for root
203-
print_color "blue" "Setting custom password for root..."
204-
echo "root:$root_password" | chpasswd
205-
echo $root_password > /workspace/root_password.txt
206-
print_color "green" "Root password set and saved in /workspace/root_password.txt"
207-
208-
# Check if environment variables are set
209-
print_color "blue" "Checking environment variables..."
210-
if [ -z "$RUNPOD_PUBLIC_IP" ] || [ -z "$RUNPOD_TCP_PORT_22" ]; then
211-
print_color "red" "Environment variables RUNPOD_PUBLIC_IP or RUNPOD_TCP_PORT_22 are missing."
212-
exit 1
213-
fi
214-
print_color "green" "Environment variables are set."
215-
216-
# Create connection script for Windows (.bat)
217-
print_color "blue" "Creating connection script for Windows..."
218-
echo "@echo off" > /workspace/connect_windows.bat
219-
echo "echo ========================================" >> /workspace/connect_windows.bat
220-
echo "echo SSH CONNECTION" >> /workspace/connect_windows.bat
221-
echo "echo ========================================" >> /workspace/connect_windows.bat
222-
echo "echo Root password: $root_password" >> /workspace/connect_windows.bat
223-
echo "echo." >> /workspace/connect_windows.bat
224-
echo "echo To connect via SSH:" >> /workspace/connect_windows.bat
225-
echo "echo ssh root@$RUNPOD_PUBLIC_IP -p $RUNPOD_TCP_PORT_22" >> /workspace/connect_windows.bat
226-
echo "echo." >> /workspace/connect_windows.bat
227-
echo "echo ========================================" >> /workspace/connect_windows.bat
228-
echo "echo FILE TRANSFER EXAMPLES (SCP)" >> /workspace/connect_windows.bat
229-
echo "echo ========================================" >> /workspace/connect_windows.bat
230-
echo "echo." >> /workspace/connect_windows.bat
231-
echo "echo Copy file TO pod:" >> /workspace/connect_windows.bat
232-
echo "echo scp -P $RUNPOD_TCP_PORT_22 yourfile.txt root@$RUNPOD_PUBLIC_IP:/workspace/" >> /workspace/connect_windows.bat
233-
echo "echo." >> /workspace/connect_windows.bat
234-
echo "echo Copy file FROM pod:" >> /workspace/connect_windows.bat
235-
echo "echo scp -P $RUNPOD_TCP_PORT_22 root@$RUNPOD_PUBLIC_IP:/workspace/yourfile.txt ." >> /workspace/connect_windows.bat
236-
echo "echo." >> /workspace/connect_windows.bat
237-
echo "echo Copy entire folder TO pod:" >> /workspace/connect_windows.bat
238-
echo "echo scp -P $RUNPOD_TCP_PORT_22 -r yourfolder root@$RUNPOD_PUBLIC_IP:/workspace/" >> /workspace/connect_windows.bat
239-
echo "echo ========================================" >> /workspace/connect_windows.bat
240-
print_color "green" "Windows connection script created in /workspace."
241-
242-
# Create connection script for Linux/Mac (.sh)
243-
print_color "blue" "Creating connection script for Linux/Mac..."
244-
echo "#!/bin/bash" > /workspace/connect_linux.sh
245-
echo "echo '========================================'" >> /workspace/connect_linux.sh
246-
echo "echo 'SSH CONNECTION'" >> /workspace/connect_linux.sh
247-
echo "echo '========================================'" >> /workspace/connect_linux.sh
248-
echo "echo 'Root password: $root_password'" >> /workspace/connect_linux.sh
249-
echo "echo ''" >> /workspace/connect_linux.sh
250-
echo "echo 'To connect via SSH:'" >> /workspace/connect_linux.sh
251-
echo "echo 'ssh root@$RUNPOD_PUBLIC_IP -p $RUNPOD_TCP_PORT_22'" >> /workspace/connect_linux.sh
252-
echo "echo ''" >> /workspace/connect_linux.sh
253-
echo "echo '========================================'" >> /workspace/connect_linux.sh
254-
echo "echo 'FILE TRANSFER EXAMPLES (SCP)'" >> /workspace/connect_linux.sh
255-
echo "echo '========================================'" >> /workspace/connect_linux.sh
256-
echo "echo ''" >> /workspace/connect_linux.sh
257-
echo "echo 'Copy file TO pod:'" >> /workspace/connect_linux.sh
258-
echo "echo 'scp -P $RUNPOD_TCP_PORT_22 yourfile.txt root@$RUNPOD_PUBLIC_IP:/workspace/'" >> /workspace/connect_linux.sh
259-
echo "echo ''" >> /workspace/connect_linux.sh
260-
echo "echo 'Copy file FROM pod:'" >> /workspace/connect_linux.sh
261-
echo "echo 'scp -P $RUNPOD_TCP_PORT_22 root@$RUNPOD_PUBLIC_IP:/workspace/yourfile.txt .'" >> /workspace/connect_linux.sh
262-
echo "echo ''" >> /workspace/connect_linux.sh
263-
echo "echo 'Copy entire folder TO pod:'" >> /workspace/connect_linux.sh
264-
echo "echo 'scp -P $RUNPOD_TCP_PORT_22 -r yourfolder root@$RUNPOD_PUBLIC_IP:/workspace/'" >> /workspace/connect_linux.sh
265-
echo "echo '========================================'" >> /workspace/connect_linux.sh
266-
chmod +x /workspace/connect_linux.sh
267-
print_color "green" "Linux/Mac connection script created in /workspace."
268-
269-
print_color "green" "Setup Completed Successfully!"
270-
echo ""
271-
print_color "yellow" "========================================"
272-
print_color "yellow" "SSH CONNECTION"
273-
print_color "yellow" "========================================"
274-
print_color "yellow" "Connect using: ssh root@$RUNPOD_PUBLIC_IP -p $RUNPOD_TCP_PORT_22"
275-
print_color "yellow" "Password: $root_password"
276-
echo ""
277-
print_color "blue" "========================================"
278-
print_color "blue" "FILE TRANSFER EXAMPLES (SCP)"
279-
print_color "blue" "========================================"
280-
print_color "blue" "Copy file TO pod:"
281-
echo "scp -P $RUNPOD_TCP_PORT_22 yourfile.txt root@$RUNPOD_PUBLIC_IP:/workspace/"
282-
echo ""
283-
print_color "blue" "Copy file FROM pod:"
284-
echo "scp -P $RUNPOD_TCP_PORT_22 root@$RUNPOD_PUBLIC_IP:/workspace/yourfile.txt ."
285-
echo ""
286-
print_color "blue" "Copy entire folder TO pod:"
287-
echo "scp -P $RUNPOD_TCP_PORT_22 -r yourfolder root@$RUNPOD_PUBLIC_IP:/workspace/"
288-
echo ""
289-
print_color "green" "Connection scripts saved in /workspace/connect_windows.bat and /workspace/connect_linux.sh"
290-
EOF
132+
To quickly set up password-based SSH, run this command to download and execute a [helper script](https://github.com/justinwlin/Runpod-SSH-Password/blob/main/passwordrunpod.sh) for password setup:
133+
134+
```bash
135+
wget https://raw.githubusercontent.com/justinwlin/Runpod-SSH-Password/main/passwordrunpod.sh && chmod +x passwordrunpod.sh && ./passwordrunpod.sh
291136
```
292137

293138
<Warning>
@@ -296,7 +141,7 @@ While SSH operates on port 22 within your Pod, Runpod assigns a different extern
296141
If you see the message `Environment variables RUNPOD_PUBLIC_IP or RUNPOD_TCP_PORT_22 are missing` when running the script, it means one or more of the required environment variables are not set. Please ensure you have met all the necessary requirements described above.
297142
</Warning>
298143

299-
After pasting the script into your terminal and entering a password, you'll see example commands for SSH or SCP which you can use to connect to your Pod and transfer files from your local machine:
144+
After running the script and entering a password, you'll see example commands for SSH or SCP which you can use to connect to your Pod and transfer files from your local machine:
300145

301146
```bash
302147
========================================
@@ -316,4 +161,4 @@ scp -P 32061 root@38.80.152.73:/workspace/yourfile.txt .
316161

317162
Copy entire folder TO pod:
318163
scp -P 32061 -r yourfolder root@38.80.152.73:/workspace/
319-
```
164+
```

pods/manage-pods.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ GPU configuration:
3131
4. Specify your **GPU count** if you need multiple GPUs.
3232
5. Click **Deploy On-Demand** to deploy and start your Pod.
3333

34+
<Warning>
35+
**CUDA Version Compatibility**
36+
37+
When using templates (especially community templates like `runpod/pytorch:2.8.0-py3.11-cuda12.8.1-cudnn-devel-ubuntu22.04`), ensure the host machine's CUDA driver version matches or exceeds the template's requirements.
38+
39+
If you encounter errors like "OCI runtime create failed" or "unsatisfied condition: cuda>=X.X", you need to filter for compatible machines:
40+
41+
1. Click **Additional filters** in the Pod creation interface
42+
2. Click **CUDA Versions** filter dropdown
43+
3. Select a CUDA version that matches or exceeds your template's requirements (e.g., if the template requires CUDA 12.8, select 12.8 or higher)
44+
45+
<Frame>
46+
<img src="/images/additional-filter-cuda-version.png" />
47+
</Frame>
48+
49+
**Note:** Check the template name or documentation for CUDA requirements. When in doubt, select the latest CUDA version as newer drivers are backward compatible.
50+
</Warning>
51+
3452
CPU configuration:
3553

3654
1. Select a **CPU type** (e.g., CPU3/CPU5, Compute Optimized, General Purpose, Memory-Optimized).

0 commit comments

Comments
 (0)