找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 11|回复: 0

[7838] 2014-03-04_linux下利用一次性口令实现安全管理

[复制链接]

6万

主题

-6万

回帖

-54

积分

管理员

积分
-54
发表于 2025-1-17 20:28:29 | 显示全部楼层 |阅读模式
2014-03-04_linux下利用一次性口令实现安全管理 l i n u x F r e e B u f   2 0 1 4 - 0 3 - 0 4         [ v p s b o a r d ] L i n u x 使 o p t w 1 0 s c p 2 s c p 1 o t p w s u d o   a p t - g e t   i n s t a l l   o t p w - b i n   l i b p a m - o t p w c o m m o n - a u t h n a n o   / e t c / p a m . d / c o m m o n - a u t h : a u t h   [ s u c c e s s = 1   d e f a u l t = i g n o r e ]   p a m _ u n i x . s o   n u l l o k _ s e c u r e : a u t h               s u f f i c i e n t   p a m _ o t p w . s o s e s s i o n         o p t i o n a l       p a m _ o t p w . s o 使 使 s s h d o t p w : n a n o   / e t c / p a m . d / o t p w : a u t h                       s u f f i c i e n t             p a m _ o t p w . s o s e s s i o n                 o p t i o n a l                 p a m _ o t p w . s o s s h d o t p w n a n o   / e t c / p a m . d / s s h d
: @ i n c l u d e   c o m m o n - a u t h : @ i n c l u d e   o t p w s s h d 3 y e s : U s e P r i v i l e g e S e p a r a t i o n   y e s C h a l l e n g e R e s p o n s e A u t h e n t i c a t i o n   y e s U s e P A M   y e s s s h d s e r v i c e   s s h   r e s t a r t o t p w .   h o m e   ( ~ / . o t p w )   .   4 : o t p w - g e n   - h   5   - w   6 4 1 0 : o t p w - g e n   - h   6   - w   7 9 G e n e r a t i n g   r a n d o m   s e e d   . . . I f   y o u r   p a p e r   p a s s w o r d   l i s t   i s   s t o l e n ,   t h e   t h i e f   s h o u l d   n o t   g a i n a c c e s s   t o   y o u r   a c c o u n t   w i t h   t h i s   i n f o r m a t i o n   a l o n e .   T h e r e f o r e ,   y o u n e e d   t o   m e m o r i z e   a n d   e n t e r   b e l o w   a   p r e f i x   p a s s w o r d .   Y o u   w i l l   h a v e   t o e n t e r   t h a t   e a c h   t i m e   d i r e c t l y   b e f o r e   e n t e r i n g   t h e   o n e - t i m e   p a s s w o r d ( o n   t h e   s a m e   l i n e ) . W h e n   y o u   l o g   i n ,   a   3 - d i g i t   p a s s w o r d   n u m b e r   w i l l   b e   d i s p l a y e d .     I t i d e n t i f i e s   t h e   o n e - t i m e   p a s s w o r d   o n   y o u r   l i s t   t h a t   y o u   h a v e   t o   a p p e n d t o   t h e   p r e f i x   p a s s w o r d .   I f   a n o t h e r   l o g i n   t o   y o u r   a c c o u n t   i s   i n   p r o g r e s s a t   t h e   s a m e   t i m e ,   s e v e r a l   p a s s w o r d   n u m b e r s   m a y   b e   s h o w n   a n d   a l l c o r r e s p o n d i n g   p a s s w o r d s   h a v e   t o   b e   a p p e n d e d   a f t e r   t h e   p r e f i x p a s s w o r d .   B e s t   g e n e r a t e   a   n e w   p a s s w o r d   l i s t   w h e n   y o u   h a v e   u s e d   u p   h a l f o f   t h e   o l d   o n e . O v e r w r i t e   e x i s t i n g   p a s s w o r d   l i s t   & # 0 3 9 ; ~ / . o t p w & # 0 3 9 ;   ( Y / n ) ?   E n t e r   n e w   p r e f i x   p a s s w o r d :   R e e n t e r   p r e f i x   p a s s w o r d :   C r e a t i n g   & # 0 3 9 ; ~ / . o t p w & # 0 3 9 ; . G e n e r a t i n g   n e w   o n e - t i m e   p a s s w o r d s   . . .
O T P W   l i s t   g e n e r a t e d   2 0 1 4 - 0 2 - 2 7   0 1 : 3 1   o n   k a l i 0 0 0   I T 4 U   V 3 B k     0 0 2   c f F E   g = G j     0 0 4   + 2 M L   F f 9 2     0 0 6   k a a g   A r : Y     0 0 8   V Z Y 8   i G s p 0 0 1   9 H 7 n   a P h V     0 0 3   f c I J   z f / P     0 0 5   Q x q f   O h g F     0 0 7   z P Y /   Q J O V     0 0 9   : N 7 K   3 z E u                         ! ! !   R E M E M B E R :   E n t e r   t h e   P R E F I X   P A S S W O R D   f i r s t   ! ! ! S S H : l o g i n   a s :   t e s t U s i n g   k e y b o a r d - i n t e r a c t i v e   a u t h e n t i c a t i o n . P a s s w o r d   0 0 3 : L i n u x   d e b i a n   3 . 2 . 0 - 4 - 6 8 6 - p a e   # 1   S M P   D e b i a n   3 . 2 . 4 6 - 1   i 6 8 6 T h e   p r o g r a m s   i n c l u d e d   w i t h   t h e   D e b i a n   G N U / L i n u x   s y s t e m   a r e   f r e e   s o f t w a r e ; t h e   e x a c t   d i s t r i b u t i o n   t e r m s   f o r   e a c h   p r o g r a m   a r e   d e s c r i b e d   i n   t h e i n d i v i d u a l   f i l e s   i n   / u s r / s h a r e / d o c / * / c o p y r i g h t . D e b i a n   G N U / L i n u x   c o m e s   w i t h   A B S O L U T E L Y   N O   W A R R A N T Y ,   t o   t h e   e x t e n t p e r m i t t e d   b y   a p p l i c a b l e   l a w . L a s t   l o g i n :   T u e   J u l     9   2 0 : 0 3 : 2 3   2 0 1 3   f r o m   1 9 2 . 1 6 8 . 2 0 0 . 1 0 t e s t @ d e b i a n : ~ $   " p a s s "   0 0 3 : p a s s f c I J   z f / P o p t w : a d d g r o u p   o p t w a d d u s e r   t e s t   o p t w : c h o w n   r o o t : o p t w   / h o m e / t e s t / . o t p w c h m o d   6 4 0   / h o m e / t e s t / . o t p w : c h m o d   7 5 0   / u s r / b i n / o t p w - g e n 2 . s c p : a p t - g e t   i n s t a l l   r s s h a p t - g e t   i n s t a l l   s c p o n l y 2 s h e l l : r s s h s c p o n l y s c p s h e l l .
s h e l l : u s e r m o d   - s   / u s r / s b i n / s c p o n l y   t e s t u s e r m o d   - s   / u s r / s b i n / r s s h   t e s t A n d   y o u   c a n   c o n f i u r e   r s s h   q u i t e   d e s c e n t : n a n o   / e t c / r s s h . c o n f C o n t e n t : #   L e a v e   t h e s e   a l l   c o m m e n t e d   o u t   t o   m a k e   t h e   d e f a u l t   a c t i o n   f o r   r s s h   t o   l o c k #   u s e r s   o u t   c o m p l e t e l y . . . a l l o w s c p # a l l o w s f t p # a l l o w c v s # a l l o w r d i s t # a l l o w r s y n c # a l l o w s v n s e r v e #   i f   y o u r   c h r o o t _ p a t h   c o n t a i n s   s p a c e s ,   i t   m u s t   b e   q u o t e d . . . #   I n   t h e   f o l l o w i n g   e x a m p l e s ,   t h e   c h r o o t _ p a t h   i s   " / u s r / l o c a l / m y   c h r o o t " u s e r = t e s t : 0 1 1 : 0 0 0 0 1 0 : " / o p t / s c p s p a c e / t e s t   c h r o o t "     #   s c p   w i t h   c h r o o t 1 o p t w l i n u x R S A S e c u r e   I D 2 r s s h s h e l l
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Nmaps Club

GMT+8, 2025-2-2 22:45 , Processed in 0.115320 second(s), 29 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表