Vast.ai GPU服务器连接
Vast.ai GPU服務器連接
1. 首先需要在Billing下添加一張信用卡,然后沖$10刀
2. 選一臺主機,然后RENT!
3. 成功以后可以在Instance里面看到
第一次創建Instance時需要配置SSH, 具體操作網站有提示,也可以參照如下步驟:
There is no ssh password, we use ssh key authentication. If ssh asks for a password, typically this means there is something wrong with the ssh key that you entered or your ssh client is misconfigured. On Ubuntu or Mac, first you need to generate an rsa ssh public/private keypair using the command:
ssh-keygen -t rsa
Next you may need to force the daemon to load the new private key:
ssh-add
這一步如果出現Permission Deny需要先啟動SSH-AGENT:
eval 'ssh-agent'
然后再執行
ssh-add
Then get the contents of the public key with:
cat ~/.ssh/id_rsa.pub
Copy the entire output to your clipboard, then paste that into the “Change SSH Key” text box under console/account. The key text includes the opening “ssh-rsa” part and the ending “user@something” part. If you don’t copy the entire thing, it won’t work.
example SSH key text:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdxWwxwN5Lz7ubkMrxM5FCHhVzOnZuLt5FHi7J9pFXCJHfr96w+ccBOBo2rtCCTTRDLnJjIsMLgBcC3+jGyUhpUNMFRVIJ7MeqdEHgHFvAZV/uBkb7RjbyyFcb4MMSYNggUZkOUNoNgEa3aqtBSzt33bnuGqqszs9bfDCaPFtr9Wo0b8p4IYil/gfOYBkuSVwkqrBCWrg53/+T2rAk/02mWNHXyBktJAu1q7qTWcyO68JTDd0sa+4apSu+CsJMBJs3FcDDRAl3bcpiKwRbCkQ+N6sol4xDV3zQRebUc98CJPh04Gnc01W02lmdqGLlXG5U/rV9/JM7CawKiIz7aaqv bob@velocity
4. 上傳文件或文件夾到服務器
Jupyter Notebook
直接用Upload上傳即可
利用scp傳輸文件
1、從服務器下載文件
scp -P PORT root@IPADDR:/REMOTEDIR/file LOCAL_FILE
將服務器/REMOTEDIR目錄下的file下載到本機LOCAL_FILE目錄下
2、上傳本地文件到服務器
scp -P PORT LOCAL_FILE root@IPADDR:/REMOTEDIR
將本機LOCAL_FILE上傳到服務器
例如Connect提供如下信息:ssh -p 7417 root@52.204.230.7 -L 8080:localhost:8080
那么,PORT=7417,IPADDR=52.204.230.7
3、從服務器下載整個目錄
scp -r username@servername:remote_dir/ /tmp/local_dir
例如:scp -r codinglog@192.168.0.101 /home/kimi/test /tmp/local_dir
4、上傳目錄到服務器
scp -r /tmp/local_dir username@servername:remote_dir
例如:
scp -P 22 -r test codinglog@192.168.0.101:/var/www/ 把當前目錄下的test目錄上傳到服務器
的/var/www/ 目錄
總結
以上是生活随笔為你收集整理的Vast.ai GPU服务器连接的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: VINS-Mono 代码详细解读——回环
- 下一篇: vscode远程连接的坑