Linux体系和编程实验报告.pdfVIP

  • 1
  • 0
  • 约7.71千字
  • 约 5页
  • 2026-02-13 发布于河北
  • 举报

Linux体系和编程

实验报告

姓名学号

实验名称实验四:Linux网络

开设学期

开设时间

报告日期

评定成绩

1,ssh,scp脚本(50分

1配置自己Linux用户至I]user2@47.107.28.1的ssh无密码登录。

过程:

|root@Mylinuxhome]#ssh-keygen-1rsa

Generatingpublic/privatersakeypair.

nterfileinwhichtosavethekey(/root/.ssh/id_rsa):/home/key

/home/keyalreadyexists.

Overwrite(y/n)?y

nterpassphrase(emptyfornopassphrase):

ntersamepassphraseagain:

[Youridentificationhasbeensavedin/home/key.

Yourpublickeyhasbeensavedin/home/key.pub.

iThekeyfingerprintis:

SHA256:DSi87vPR3nbrrFYxbNlYkkqqmFVK8BWo3CGiBQKjCoQroot@Mylinux

1

Thekeysrandomartimageis:

l-h--[RSA2048]----4-

i|*o..|

Io.0.o+...0.I

IO000.=o+00=1

|o.oo+o.4-+o|

l|..45..+.

•o...

..o.o..

.o..oo-H-.

|+[SHA256]工

无密登录:

[root@Mylinuxhome]#sshuser2@47.107.28.1

WelcometoAlibabaCloudlasticComputeService!

Activatethewebconsolewith:systemctlenable--nowcockpit.socket

Lastlogin:ThuApr142C:28:312022from222.18.126.67

建立目录:

user2@chenbackup]$mkdirgongzhihao

user2@chenbackup]$Is

2)编写一个rcmotecp.sh的脚本。

测试:

(rootOMylinuxfin]#./rcnotccp.shfilclfilc2file?f?ilc

filel:OK

file2:OK

file3:OK

invalidfile:f?ile

远程端:

[user2@chengongzhihao)$

文档评论(0)

1亿VIP精品文档

相关文档