服务器免密登录与传输——rsa密钥的应用技巧

本文介绍了如何使用RSA密钥实现Linux服务器的免密登录和文件传输脚本自动化。首先,通过生成RSA密钥对并将其公钥写入服务器的authorized_keys文件中,实现无密码登录。然后,创建脚本实现文件的批量上传和下载,并在下载后自动删除服务器上的文件。最后,提到了如果遇到免密登录问题,应检查ssh配置文件。
摘要由CSDN通过智能技术生成

前言

在进行化学模拟计算的过程中,计算在远程服务器上进行,而分子建模和结果可视化一般在Windows系统上进行,这就意味着在本地机器和远程服务器上会存在频繁的文件传输。简单的文件传输方式能极大提高工作效率。目前我所了解的文件传输主要有以下几类:

  • putty的PSFTP程序
    基本操作跟FTP1类似
psftp> help
!      run a local command
bye    finish your SFTP session
cd     change your remote working directory
chmod  change file permissions and modes
close  finish your SFTP session but do not quit PSFTP
del    delete files on the remote server
dir    list remote files
exit   finish your SFTP session
get    download a file from the server to your local machine
help   give help
lcd    change local working directory
lpwd   print local working directory
ls     list remote files
mget   download multiple files at once
mkdir  create directories on the remote server
mput   upload multiple files at once
mv     move or rename file(s) on the remote server
open   connect to a host
put    upload a file from your local machine to the server
pwd    print your remote working directo
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值