如何使用Python脚本在远程系统中创建目录

发布于 2025-01-27 17:43:39 字数 88 浏览 2 评论 0原文

我想使用Python脚本或套接字编程在远程系统中创建一个目录。我有远程系统的用户名,密码和IP地址。我可以在本地计算机中执行此操作,但不能在遥控器中进行。请帮忙!

I want to create a directory in my remote system using python script or by socket programming. I have remote system's Username, password and IP address. I am able to do this in my local machine but not in remote. Please help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

面如桃花 2025-02-03 17:43:39

下载 putty 然后连接到远程系统)和终端写入mkdir foldername

Download Putty then connect to remote system) and in terminal write mkdir foldername

极度宠爱 2025-02-03 17:43:39

要在远程计算机上创建目录,您必须首先连接到它。TELNET,SSH和SSH用于连接到远程计算机。显然,Telnet或SSH服务应在远程计算机上运行,​​否则您将无法连接。在Telnet的情况下,数据以纯文本传输,最好使用SSH协议。

使用SSH连接到远程计算机后,您将能够在远程计算机上执行命令。

现在,由于您想在Python中做所有事情,因此您必须在Python上编写一个完整的SSH客户端。这非常适合学习,因为您将了解插座编程和密码学。

如果您很着急,则可以使用良好的SSH库。

如果您遇到网络连接错误,请检查SSH是否安装在远程计算机中。如果是,请检查防火墙设置。

To create a directory on a remote machine, you will have to first connect to it.Telnet and SSH and SSH is used to connect to remote machines. Obviously TELNET or SSH service should be running on the remote machine, otherwise you won't be able to connect.Since in case of Telnet,data is transfered in plain text, it's better to use SSH protocol.

Once connected to the remote machine using SSH, you will be able to execute commands on the remote machine.

Now since you want to do everything in Python, you will have to write a complete SSH client in Python. Which is greate for learning, because you will learn about socket programming and cryptography.

If you are in a hurry, you can use a good SSH library.

If you are getting network connection error, please check whether SSH is installed in the remote machine or not. If yes, then check firewall settings.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文