尚观第十一天学习笔记ssh ftp
来源:互联网 发布:三国之数据辅助小说 编辑:程序博客网 时间:2024/04/29 13:50
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 可以上传文件
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 可以上传文件
- 尚观第十一天学习笔记ssh ftp
- 第十一天学习笔记
- 黑马程序员--- 学习笔记(第十一天)
- iOS-学习笔记-UI-第十一天
- java学习笔记第十一天:1_Object
- 尚观学习笔记 用户权限管理
- 尚学堂学习笔记。。。
- 第十一天:听课笔记
- 程序学习第十一天
- Java学习第十一天
- .net学习第十一天
- JAVA学习第十一天
- rhce学习第十一天
- Java学习第十一天
- Java学习第十一天
- python学习---第十一天
- 【屌丝学习笔记】第十一天 JAVA基础
- 《30天自制操作系统》学习笔记——第十一天
- ispostback
- iphone:GPS位置和地图开发
- yaffs基础第一篇——yaffs中的核心数据结构
- 将一句话的单词进行倒置
- JAVA中的final关键字
- 尚观第十一天学习笔记ssh ftp
- html框架 FrameSet,Frame 以及Iframe画中画标签
- 音频格式介绍
- 小问题
- 建立TCP连接的三次握手
- 三思录
- 、SendMessage/PostMessage 组合键解决方案
- Erlang内存管理和运行模式笔记
- oracle阻塞检查与oradebug的实践