Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all,
I am trying to connect to the client from server with the user test. on the client i have added user "test" and from the server, i am trying to connect to client via ssh as below
Code:
root@server:/home# su - test
$ ssh client1
The authenticity of host 'client1 (172.67.8.90)' can't be established.
ED25519 key fingerprint is SHA256:PpN7cwhwwfd59H9yPtUhIv7hP7B8/IH9Fc2OXWX8dlo.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'client1 ' (ED25519) to the list of known hosts.
Unauthorized access to this machine is prohibited
Press <Ctrl-D> if you are not an authorized user
(test@client1) Password:
Connection closed by 172.67.8.90 port 22
though I give the right password it doesnot take at all. what could be the issue?
where am i going wrong.please suggest
That looks normal, if it were roort. Most systems allow only either key-based or certificate-based login for root. Try logging in as another user or else make and install a key pair for root. However it is usually a bad idea to allow remote login for root and most tasks can be accomplished by other means. What problem are you trying to solve?
Edit: misread the first line. See the -v -v -v suggestion instead.
Last edited by Turbocapitalist; 01-18-2023 at 10:14 AM.
you might want to use ssh -vvv <host> to see what's going on. We don't know the configuration so we can hardly find the root cause. Would be nice to give us more details.
you might want to use ssh -vvv <host> to see what's going on. We don't know the configuration so we can hardly find the root cause. Would be nice to give us more details.
yes i ran in verbose mode it always asks me to issue password, but it doesnot accept password, but from the client i can always switch as test user.
If anything at all involving client-server interaction not working as expected you should start by analysing server logs - do it. OpenSSH log is in /var/log/auth.log, you might want to increase log verbosity using LogLevel directive in /etc/ssh/sshd_config.
yes i ran in verbose mode it always asks me to issue password, but it doesnot accept password, but from the client i can always switch as test user.
and it is still not enough to help you. You need to either show us the config and the real commands (how did you execute, what and what was the response) or check the log files on both sides.
OP is connecting “from server to client”…
Is sshd configured and running on the client? I’m guessing not.
ssh is a one-way process. Being able to connect from machine A to machine B does not mean you can connect from machine B to machine A. You’d need to set up sshd on the “client” machine to be able to connect to it (at which time, the “server” will become the client and vice versa)
OP is connecting “from server to client”…
Is sshd configured and running on the client? I’m guessing not.
It did connect, it just did not authenticate. Checking sshd's logs on the system receiving the connection would be the way to go, as mentioned in post #8 above.
OP is connecting “from server to client”…
Is sshd configured and running on the client? I’m guessing not.
ssh is a one-way process. Being able to connect from machine A to machine B does not mean you can connect from machine B to machine A. You’d need to set up sshd on the “client” machine to be able to connect to it (at which time, the “server” will become the client and vice versa)
sshd is configured and it justs works fine from another machines.
sshd is configured and it justs works fine from another machines.
Then try tracking what's going on with the connection from the one specific client by setting up a one-off SSH session. On the system being connected to:
That will allow one single attempt at connecting. On the server, the output from sshd will be saved in /tmp/server1.ssh.log and on the client the output will be save in /tmp/client1.ssh.log and both will contain information from only the single session attempt.
Then try tracking what's going on with the connection from the one specific client by setting up a one-off SSH session. On the system being connected to:
That will allow one single attempt at connecting. On the server, the output from sshd will be saved in /tmp/server1.ssh.log and on the client the output will be save in /tmp/client1.ssh.log and both will contain information from only the single session attempt.
Thank you. I ran this on server and client side and I have the following. Says too many authentication failures. may be i create new user on server and client and try again
on client1:
Code:
PAM: Authentication failure for illegal user test from "172.60.20.15"
Failed:/keyboard-interactive/pam for invalid user test from "172.67.8.90" port 54264 ssh2
Disconnecting invalid user test port 54264:Too many authentication failures
on server1:
Code:
Disconnect from 172.67.8.90 port 2222:22 Too many authentication failureson client1:
PAM: Authentication failure for illegal user test from "serverip"
Failed:/keyboard-interactive/pam for invalid user test from "serverip" port 54264 ssh2
Disconnecting invalid user test port 54264:Too many authentication failures
Thanks. That seems to narrow it down to "client1". Does the account "test" exist on that system? What are the full configuration settings there?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.