安装samba相关包
sudo apt-get install samba
sudo apt-get install smbclient
samba -V查看是否安装成功
sudo vi /etc/samba/smb.conf
[share]
comment = share folder
browseable = yes
path = /home/yangyun/share
create mask = 0777
directory mask = 0777
扫描二维码关注公众号,回复:
6973466 查看本文章
valid users = zhang
force user = nobody
force group = nogroup
public = yes
writable = yes
available = yes
:wq!
退出保存
sudo smbpasswd -a yangyun
sudo /etc/init.d/samba restart
windows下映射网盘
\\+ ip\share
share 是因为/etc/samba/smb.conf 中[share]
////////////////////////////////////////////////////////////
ssh配置
sudo apt-get install ssh
sudo vi /etc/ssh/sshd_config
修改
PermitRootLogin yes #允许root登录 PermitEmptyPasswords no #不允许空密码登录 PasswordAuthentication yes # 设置是否使用口令验证。
sudo /etc/init.d/ssh restart
ps -ef |grep ssh
查看是否ok