LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   too many logins, can't scp files ??? (https://www.linuxquestions.org/questions/linux-newbie-8/too-many-logins-cant-scp-files-4175624799/)

atjurhs 03-02-2018 09:32 AM

too many logins, can't scp files ???
 
hey guys,

i'm working on a LAN and i'm trying to scp one set of files across the LAN from one machine (juggernaut) to my local/home machine (darkmatter) and yes i have user accts. on both machines, and no i did not name the machines. my sys admin named them. he has no idea how to fix this problem and he really doesn't know squat about linux anyways.

so i ssh to juggernaut,no problem, and then i give the following command on juggernaut while i'm logged in on juggernaut

Code:

[atjurhs@juggernaut directory]$ scp files darkmater:/home/atjurhs/tmp
oh, another piece of information that might help is that i'm running Cento7.4

juggernaut "appears" to have done his job and returns no errors, BUT when i open a new terminal on darkmatter and cd to /home/atjurhs/tmp (atjurhs is my user name) the files are not there?

i can log logout and log back into darkmatter, no problem. i can log logout and log back into juggernaut using ssh, no problem. when i do ssh back into juggernaut i get the message on juggernaut of

Code:

Too many logins for atjurhs
but i'm still able to surf around on juggernaut and do various tasks, i'm just not able to scp files from juggernaut to darkmatter.

if i close out of most of my terminals, open a terminal back up and log back into juggernaut i can scp the files to darkmatter no problem.

why would too many logins on juggernaut prevent me from scp files onto darkmatter

one other piece of info is, i'm running Centos7.4

RandomTroll 03-02-2018 10:51 AM

Because juggernaut limits logins from darkmatter (or, more likely, all users). scp logs in.

michaelk 03-02-2018 10:54 AM

Quote:

so i ssh to juggernaut,no problem, and then i give the following command on juggernaut while i'm logged in on juggernaut

scp files juggernaut:/home/atjurhs/tmp
The source and destination is the same computer. You need to change juggernaut to darkmatter in your command.

atjurhs 03-02-2018 12:29 PM

michaelk thanks for your help! but...

juggernaut is a server and darkmatter is my local. i'm not sure if juggernaut is on Centos7.4 or not?

you are correct, when i typed in the command in this forum shown in post #1, i typed it in this forum incorrectly, but when i type in the correct command on juggernaut i get the behavior i described, i'll go back and edit post #1 for clarity

Code:

[atjurhs@juggernaut directory]$ scp files darkmatter:/home/atjurhs/tmp
so i do know that that command i typed just here in post #4 is the command that doesn't work with too many terminals open on juggernaut, because when i close out of all but a few terminals, the command works just fine and the files transfer from juggernaut to darkmatter, i apologize for the confusion!

i have even tried it using darkmatter's ip address in the command and with too many terminals open on juggernaut, they still don't transfer

michaelk 03-02-2018 12:46 PM

As RandomTroll suggested the server could be configured to limit maxlogins (/etc/security/limits.conf)

atjurhs 03-02-2018 12:54 PM

hmmm?

even with many terminals on juggernaut open, i can still give other commands on juggernaut and they work just fine it 's only when trying to transfer files off of it

the limits.conf file only has comments, working no info

in the /etc/security directory there is a limits.d sub-directory, within that there is a 90-nproc.conf file, it's only info is

Code:


*      soft  nproc  1024
root  soft  nproc unlimited

certainly i have much fewer process than that. i mean with 10 or 11 terminals running it fails. i haven't yet played with what's the max number of terminals i can have running before the command fails

atjurhs 03-02-2018 01:46 PM

if this hepls

juggernaut is running Centos6.9
darkmatter is running Centos7.4

so maybe there's a clash in that?

michaelk 03-02-2018 02:36 PM

My memory is failing. If you say it is failing at 10 or 11 terminals then it could be due to sshd's MaxSessions directive.

Quote:

MaxSessions
Specifies the maximum number of open sessions permitted per network connection. The default is 10.

scasey 03-02-2018 05:44 PM

michaelk is probably pretty close to it, but
Why do you have more than one terminal connected to either computer?
Do you understand that scp does an additional logon? It does not use the open ssh connection, but creates a separate ssh connection for the copy.
If you have multiple terminal windows open and multiple scp attempts, that could be hitting the limit.

michaelk 03-02-2018 07:22 PM

Well, actually MaxSessions is for session multiplexing and not for standalone sessions. I would guess that the OP isn't using multiplexing.

There is a systemd-logind max session configuration but does not apply to sftp?

I'm still looking...

atjurhs 03-05-2018 07:02 AM

how do i find out about multiplexing and masxsessions?

i still gotta ask how could too many sessions ever be a problem for it? that sounds so "Windows" like

Turbocapitalist 03-05-2018 10:02 AM

Quote:

Originally Posted by atjurhs (Post 5827454)
how do i find out about multiplexing and masxsessions?

Mostly through the manual pages for ssh and ssh_config. There is also an online text on multiplexing. I'm not sure it will help regarding the number of login sessions though. It multiplexes SSH sessions over the single TCP session. But do give it a try and say one way or the other.

OpenSSH's setting for MaxSessions would be over on the server. See the manual page for sshd_config about that.

scasey 03-05-2018 11:09 AM

atjurh: Please post the contents of /etc/security/limits.conf on both servers.

Again, each scp command creates another login...they do NOT use the login of the ssh terminal in which they are connected, so if the limit in limits.conf is set to 2, and you have two open terminals to the server, then the scp will constitute a third login, resulting in "Too many logins for <user>"

atjurhs 03-05-2018 01:25 PM

Quote:

Originally Posted by scasey (Post 5827553)
atjurh: Please post the contents of /etc/security/limits.conf on both servers.

Again, each scp command creates another login...they do NOT use the login of the ssh terminal in which they are connected, so if the limit in limits.conf is set to 2, and you have two open terminals to the server, then the scp will constitute a third login, resulting in "Too many logins for <user>"

BINGO, give the man a prize :)

although the limits.conf file on juggernaut (the server) has all lines commented out thereby using the default value. the limits.conf file on darkmatter does not, it reads

Code:

* hard maxlogins 10

scasey 03-05-2018 01:38 PM

There you go... :)
I did not know about that file until I searched for "Too many logins for user" -- It appears to be part of the PAM configuration, about which I know nothing.

Glad I could help.


All times are GMT -5. The time now is 11:46 PM.