在linux系统上创建一个windows的磁盘映射及免登录
原创
©著作权归作者所有:来自51CTO博客作者kimbook的原创作品,请联系作者获取转载授权,否则将追究法律责任
在linux系统上创建一个windows的磁盘映射。
sudo mount -o username=administrator,password=123 //192.168.12.193/d$ /mnt/win
/d$ 是指windowns 的D盘。
/mnt/win 是本地的路径。
linux 实现免登陆
两台机器 A:192.168.1.1,B:192.168.1.2
A 登陆至 B 免密码登陆
实现:
A机器:
1. cd $HOME/.ssh (一般情况下,Linux系统中自带了 ssh ,没有的话,需要手动安装 openssh)
2. ssh-keygen -t dsa 生成密钥。(dsa换成rsa,即是使用rsa加密算法生成密钥了)
Generating public/private rsa key pair.
Enter file in which to save the key (/home/kim/.ssh/id_rsa): kimkey
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in kimkey.
Your public key has been saved in kimkey.pub.
The key fingerprint is:
3. scp ~/.ssh/kimkey.pub B@192.168.1.2:~/.ssh/ (将生成的公
4. cat ~/.ssh/kimkey.pub >> ~/.ssh/authorized_keys (将kimkey.pub的内容追加到 authorized_keys中)
现在,即可实现免密码登陆。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Linux或Windows上实现端口映射
通常服务器会有许多块网卡,因此也可能会连接到不同的网络,在隔离的网络中,某些服务可能会需要进行通信,此时服务器经过配置就可以承担起了转发数据包的功能。
内网 外网 端口映射 Linux或Windows上实现端口映射 RHCE -
在linux服务上搭建一个最简单的smb文件共享
linux服务器部署一个简单的smb共享,并且添加用户设置用户权限
linux 用户组 访问共享 -
Linux文件系统及与磁盘的映射
linux文件系统如何与实际的磁盘映射,以及linux是如何一步步读取目录和文件数据的。
Linux 文件系统 磁盘映射