在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中)
现在,即可实现免密码登陆。