LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-02-2018, 09:32 AM   #1
atjurhs
Member
 
Registered: Aug 2012
Posts: 220

Rep: Reputation: Disabled
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

Last edited by atjurhs; 03-02-2018 at 12:32 PM. Reason: added OS info
 
Old 03-02-2018, 10:51 AM   #2
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,271

Rep: Reputation: 216Reputation: 216Reputation: 216
Because juggernaut limits logins from darkmatter (or, more likely, all users). scp logs in.
 
Old 03-02-2018, 10:54 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,911

Rep: Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849
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.
 
Old 03-02-2018, 12:29 PM   #4
atjurhs
Member
 
Registered: Aug 2012
Posts: 220

Original Poster
Rep: Reputation: Disabled
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

Last edited by atjurhs; 03-02-2018 at 12:34 PM.
 
Old 03-02-2018, 12:46 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,911

Rep: Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849
As RandomTroll suggested the server could be configured to limit maxlogins (/etc/security/limits.conf)
 
Old 03-02-2018, 12:54 PM   #6
atjurhs
Member
 
Registered: Aug 2012
Posts: 220

Original Poster
Rep: Reputation: Disabled
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

Last edited by atjurhs; 03-02-2018 at 01:03 PM.
 
Old 03-02-2018, 01:46 PM   #7
atjurhs
Member
 
Registered: Aug 2012
Posts: 220

Original Poster
Rep: Reputation: Disabled
if this hepls

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

so maybe there's a clash in that?
 
Old 03-02-2018, 02:36 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,911

Rep: Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849
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.
 
Old 03-02-2018, 05:44 PM   #9
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,614

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
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.
 
Old 03-02-2018, 07:22 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,911

Rep: Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849Reputation: 2849
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...
 
Old 03-05-2018, 07:02 AM   #11
atjurhs
Member
 
Registered: Aug 2012
Posts: 220

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-05-2018, 10:02 AM   #12
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,107
Blog Entries: 3

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
Quote:
Originally Posted by atjurhs View Post
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.
 
Old 03-05-2018, 11:09 AM   #13
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,614

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
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>"
 
Old 03-05-2018, 01:25 PM   #14
atjurhs
Member
 
Registered: Aug 2012
Posts: 220

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
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
 
Old 03-05-2018, 01:38 PM   #15
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,614

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SCP Copy files JJJCR Linux - Server 8 12-12-2013 01:51 AM
LXer: Using scponly To Allow SCP/SFTP Logins And Disable SSH Logins On Debian Squeeze LXer Syndicated Linux News 0 08-24-2011 04:20 AM
[SOLVED] How do I scp all files except for ... ? ccornchip Linux - Newbie 4 03-07-2011 04:28 AM
copy files....using scp help me suguname Mandriva 2 01-26-2005 01:14 AM
SSH and SCP user logins sopiaz57 Linux - Security 11 01-27-2004 09:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration