rlogin - 512/513/514 - without password

2024-05-31 02:08
文章标签 without password 512 513 514 rlogin

本文主要是介绍rlogin - 512/513/514 - without password,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

rlogin简介

远程登录(rlogin)是一个UNIX命令,它允许授权用户进入网络中的其它UNIX机器并且就像用户在现场操作一样。一旦进入主机,用户可以操作主机允许的任何事情,比如:读文件、编辑文件或删除文件等。Rlogin:远程登录命令rloginRemoteLogin in Unix systems


实验环境

root@linux:~# uname -a
Linux linux 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux


安装rlogin程序前,请自行安装xinetd

root@linux:~# apt-get install rsh-server rsh-client
Reading package lists... Done
Building dependency tree        
Reading state information... Done
The following NEW packages will be installed:
  rsh-client rsh-server
0 upgraded, 2 newly installed, 0 to remove and 16 not upgraded.
Need to get 73.0 kB of archives.
After this operation, 319 kB of additional disk space will be used.
Get:1 http://http.debian.net/debian/ wheezy/main rsh-client amd64 0.17-15 [33.9 kB]
Get:2 http://http.debian.net/debian/ wheezy/main rsh-server amd64 0.17-15 [39.1 kB]
Fetched 73.0 kB in 4s (17.9 kB/s)      
Selecting previously unselected package rsh-client.
(Reading database ... 115854 files and directories currently installed.)
Unpacking rsh-client (from .../rsh-client_0.17-15_amd64.deb) ...
Selecting previously unselected package rsh-server.
Unpacking rsh-server (from .../rsh-server_0.17-15_amd64.deb) ...
Processing triggers for man-db ...
Setting up rsh-client (0.17-15) ...
update-alternatives: using /usr/bin/netkit-rcp to provide /usr/bin/rcp (rcp) in auto mode
update-alternatives: using /usr/bin/netkit-rsh to provide /usr/bin/rsh (rsh) in auto mode
update-alternatives: using /usr/bin/netkit-rlogin to provide /usr/bin/rlogin (rlogin) in auto mode
Setting up rsh-server (0.17-15) ...
Installing new version of config file /etc/pam.d/rlogin ...
Installing new version of config file /etc/pam.d/rsh ...
Note: xinetd currently is not fully supported by update-inetd.
      Please consult /usr/share/doc/xinetd/README.Debian and itox(8).
Note: xinetd currently is not fully supported by update-inetd.
      Please consult /usr/share/doc/xinetd/README.Debian and itox(8).
Note: xinetd currently is not fully supported by update-inetd.
      Please consult /usr/share/doc/xinetd/README.Debian and itox(8).

配置rshrlogin,允许远程登录,无需密码验证.

vim /etc/xinetd.d/rsh

# default: on
# description: The rshd server is the server for the rcmd(3) routine and, \
#       consequently, for the rsh(1) program.  The server provides \
#       remote execution facilities with authentication based on \
#       privileged port numbers from trusted hosts.
service shell
{
        socket_type          = stream
        wait                 = no
        user                 = root
        # log_on_success       += USERID
        # log_on_failure       += USERID
        server                = /usr/sbin/in.rshd
        disable               = no
}
 
service login
{
        socket_type          = stream
        wait                 = no
        user                 = root
        # log_on_success       += USERID
        # log_on_failure       += USERID
        server                = /usr/sbin/in.rlogind
        disable               = no
}

修改配置文件/etc/pam.d/rlogin,将pam_rhosts.so放在pam.securetty.so前面

#%PAM-1.0
#auth           required        pam_securetty.so
auth            sufficient      pam_rhosts.so
auth            required        pam_securetty.so
@include common-auth
@include common-account
@include common-session
@include common-password

添加允许登录的主机,修改文件/root/.rhosts/etc/hosts,/etc/hosts.equiv

root@linux:~# cat /root/.rhosts  
+ +
root@linux:~# cat /etc/hosts
127.0.0.1       localhost
127.0.1.1       linux
192.168.1.109   gnu
 
 
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
root@linux:~# cat /etc/hosts.equiv  
# /etc/hosts.equiv: list  of  hosts  and  users  that are granted "trusted" r
#                   command access to your system .
+ +

登录rlogin

root@gnu:~# rlogin -l root 192.168.1.112
Last login: Sat Sep  6 14:05:44 EDT 2014 from gnu on pts/2
Linux linux 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64
 
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
 
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@linux:~# uname -a
Linux linux 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux


注:
如果rlogin -l root 登录,出现rlogind: Host address mismatch. 错误
请将客户机IP和计算机名,加入/etc/hosts.

测试环境,请下载metasploitable2.

这篇关于rlogin - 512/513/514 - without password的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1017239

相关文章

【异常】java.sql.SQLException: Unable to load authentication plugin ‘caching_sha2_password‘.

异常现象 执行mysql数据库操作的时候,出现以下异常信息: java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:868) ~[mysql-connector-

Windows用户取消共享文件夹密码方法(Method for Windows Users to Cancel Shared Folder Password)

Windows用户取消访问共享文件夹密码方法 💝💝💝欢迎来到我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 推荐:Linux运维老纪的首页,持续学习,不断总结,共同进步,活到老学到老 导航剑指大厂系列:全面总结 运维核心技术:系统基础、数据库、网路技术、系统安全、自动化运维、容器技术、监

Login failed:make sure your username and password are correct and that you’re an admin or moderator

Login failed:make sure your username and password are correct and that you’re an admin or moderator   1.使用MySql查看工具进入数据库,进入表“ofuser”,把字段 plainPassword 改成 123,然后在你的控制台上输入该表的   username跟plainPa

without bells and whistles 深度学习

深度学习经常能看到这句话: without bells and whistles  英语本意是花哨的事物,翻译成中文我们经常说的花里胡哨的东西 一般网络都是组装的。用别人的backbone,然后加上自己发明的部件,或者理念。之后证明自己有效。 并不会把现有的所有最好用的东西都试一遍,得到一个好结果,然后再说自己有用。 通常还会做消融性实验,证明自己部件 能够对现有网络的增幅。而且科学研究不

CMakeCXXCompilerId.cpp:514: multiple definition of `main';

cmake的时候报的这个错误,反复检查了 代码 只有一个main() 方法,后来查看了CMakeCXXCompilerId.cpp: 这个文件,发现在最后cmake 产生了一个main 和我的main 函数冲突;解决办法 手动删掉CMakeCXXCompilerId.cpp 中的main方法,保存后 make就能编译过了。没有找到原因为啥 会这样,我反复试过 重新cmake ,每次都会产生,且别人

mysql密码策略修改(password does not satisfy the current policy requirements)

1.查看当前策略.SHOW VARIABLES LIKE 'validate_password%'; 2.修改策略 等级改为最低:set global validate_password_policy=LOW; 长度改为6:set global validate_password_length=6;

MySQL8.0 以上版本 “caching_sha2_password cannot be loaded” 问题解决办法

MySQL8 以上版本客户端登录 “caching_sha2_password cannot be loaded” 问题 解决办法1: 用root用户登录mysql,然后执行两行命令: ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '密码';FLUSH PRIVILEGES; 注: 1. docker部署的M

算法day16(补第15天)|用递归方法求解:513.找树左下角的值

@TOC 513.找树左下角的值 递归法(补day15) 难度较大,代码如下: class Solution {public:int result;int maxdepth=INT_MIN;void traversal(TreeNode* root,int depth){if(root->left==nullptr&&root->right==nullptr){if(maxdepth<d

store password in keychain 反复出现的解决办法

要注意。 有些平台 用用户名是不能登陆的得用邮箱  比如 coding 就不能 。 解决办法     //END

LeetCode #3. Longest Substring Without Repeating Characters

题意: 计算一个字符串的中的最长的不含有重复字母的长度 解法: 尺取法的裸题了,维护2个指针l,r, 不断移动r指针,同时检查[l,r]是不是存在重复的了,如果存在就移动l指针了 class Solution {public:int lengthOfLongestSubstring(string s) {int n = s.size();int l=0, r=0;set<char> S;in