尚观第十一天学习笔记ssh ftp

NFS:
nfs提供文件系统
portmap 提供协议rpc
[root@station230 ~]# /etc/init.d/portmap restart
[root@station230 ~]# /etc/init.d/nfs restart

配置文件:
主包:nfs-utils
[root@station230 ~]# vim /etc/exports

/tmp *(rw,no_root_squash)
[root@station230 nfs]# mount -t nfs 192.168.100.253:/tmp /mnt/nfs/

[root@station230 nfs]# showmount -e 192.168.100.253
Export list for 192.168.100.253:
/tmp *
[root@station230 ~]# showmount -a 192.168.100.253

ssh:
[root@station230 nfs]# /etc/init.d/sshd start
启动 sshd: [确定]

ssh无密码登录:
[root@station230 .ssh]# ssh-keygen
[root@station230 .ssh]# scp id_rsa.pub 192.168.100.3:/root/.ssh/authorized_keys

修改端口:
[root@station230 .ssh]# vim /etc/ssh/sshd_config

tcp wrapper:
vim /etc/hosts.allow
vim /etc/hosts.deny
sshd:192.168.100.155
sshd:192.168.100.
sshd:192.168.100.0/255.255.255.0
sshd:192.168.100.0/24
sshd:192.168.100.*
sshd:192.168.100.1?,192.168.100.2?

samba:
配置文件:
[root@station230 ~]# vim /etc/samba/smb.conf

74 workgroup = MYGROUP //工作组
75 server string = Samba Server //描述

security = share //共享级别

289 [mysamba]
290 comment = this is mysamba!
291 path = /haha
292 public = yes
293 writable = yes
重启服务:
[root@station230 samba]# /etc/init.d/smb restart

客户端挂载:
[root@station230 /]# mount -t cifs //192.168.1.253/mysamba /mnt/samba
Password:
[root@station230 /]# cd /mnt/samba
[root@station230 samba]# ls
a b

user级别(带用户名和密码):
vim /etc/samba/smb.conf
security = user

[mysamba]
comment = this is mysamba!
path = /heihei
writable = yes

添加本地帐户:
[root@station230 samba]# useradd smbuser1

添加smb帐户:
[root@station230 samba]# smbpasswd -a smbuser1
New SMB password:
Retype new SMB password:
Added user smbuser1.

挂载(user级别):
[root@station230 samba]# mount -t cifs -o username=smbuser1 //192.168.1.253/mysamba /mnt/samba1
Password:

[root@station230 samba]# smbclient -L 192.168.1.253
Password:

常用共享属性:
[mysamba]
comment = this is mysamba!
path = /heihei

public = yes

writable = yes
write list = user1 user2 @grp1 @grp2

read only = yes
read list = user1 user2 @grp1 @grp2

browseable = yes

valid users = user1 user2 @grp1 @grp2

printable = no

tftp:基于xinetd的服务
[root@station230 Server]# /etc/init.d/xinetd restart
[root@station230 Server]# vim /etc/xinetd.d/tftp
disable = no
server_args = -s -c /tftpboot

-c 可以上传文件
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值