Sponsored Content
Top Forums Shell Programming and Scripting Problem with ssh on target server. Post 303038813 by stomp on Saturday 14th of September 2019 09:22:53 AM
Old 09-14-2019
Hi Mohtashims,

I'm now sitting on my notebook and I checked the two different Debug-Outputs of the 2 ssh connections. I clearly see differences.

I assume, you have - as I suggested - to debug the server side. But from the client side, there are visible differences, which shed a little light on the situation.

General Hints

I'm watching you and your questions quite a while. Your technical knowledge is quite good. You have scripting skills. You know how to use the commands and build programs upon that. That's very good.

What I see too, is that you are quickly asking questions if you stumble upon errors like here. So I think a further good skill, which will bring you forward in your overall competence would be problem investigation and problem solving capability.

What do you need for that?
  • Patience and willingness to deeply and carefully investigate a problem. Take your time, read debug output very carefully.
  • Try to understand what's happening! Step by step.
  • Think about it! What can be wrong? Where can be an error?
  • Think about how to get more information in the process! Where to get more information in the process?
  • Isolate more and more exactly the spot of the error
  • Debug output your variables
  • Make small test programs

    If you do not understand why the whole program reacts like it does, take small bits out of it and make a small testing program and take the problematic data into that.
  • Be prepared for own blind spots.

    Program errors you do not recognize even if they are directly in front of you, even if you'd seen them a dozen of times.(I had two spelling errors in your name in this post even if I read a hundred times in this forum so far.) Maybe Programming language behaviour that is not like you always believed it to be.
  • From time to time a break helps a lot


Apply that on the current problem and you will get closer to the cause.

So my question to you is here: What are the differences between the two client connection session debug logs?

Last edited by stomp; 09-14-2019 at 11:39 AM..
 

9 More Discussions You Might Find Interesting

1. Programming

Problem in registering new netfilter target module

Friends I'm facing a big problem trying to extend the netfilter. Somone please help me with your quick reply (any hint) as I've to meet a deadline. My problem is that I've written a new netfilter target module and its corresponding userspace program for iptables to change the packet type of a... (0 Replies)
Discussion started by: Rakesh Ranjan
0 Replies

2. Solaris

network config problem - how to set the server for others to ssh without password

Hi, I want to ssh the linux server without inputting the password, how can I config this server? Thanks in advance! (1 Reply)
Discussion started by: GCTEII
1 Replies

3. AIX

Problem in SSH Install in AIX 4.3 Server.

Hi Friends I am trying to install ssh in one of my AIX4.3 server. I downloaded openssh and openssl from IBM site. While installing them openssh failed. The lpcheck command display looks like this: # lppchk -v lppchk: The following filesets need to be installed or corrected to bring ... (5 Replies)
Discussion started by: efunds
5 Replies

4. Shell Programming and Scripting

Shell script to transfer the files from source to target server.

I need to write a shell script to transfer the files every hour from source - target server. The cron job should be running every hour and shouldn't copy already copied files to the remote server ? I was able to write intial script but not able to get the logic for (in the next run it should... (12 Replies)
Discussion started by: radhirk
12 Replies

5. Solaris

Improperly formatted value for 'tftp-server' error while booting the target from LAN

Hi, I wish to install solaris 10 on a target machine (t1000) by using Jumpstart. I have configured by jumpstart environment for the same. When i boot the target with the option "boot net -v install" i get the following error... {0} ok boot net -v install Boot device: /pci@7c0/pci@0/network@4... (3 Replies)
Discussion started by: hemalsid
3 Replies

6. Shell Programming and Scripting

copy files from remote server (B) to target server (A)?

Hi All, what is the comand to log off the remote server? I have 2 servers A, B. I need to find all files older than 7 days on server B and copy over to server A. My logic is: login the remote server: ================= ssh hostB cd /data/test find . -mtime -7 -ls | awk '{print... (4 Replies)
Discussion started by: Beginer0705
4 Replies

7. Shell Programming and Scripting

Problem running ssh from remote server

So I have a script which performs some basic commands on another server via ssh. It works great, no issues at all. Let's call this "Script A" BUT, this working script is to be executed remotely from a different UNIX script on another server, also by ssh. Let's call this "Script B". When... (1 Reply)
Discussion started by: newerakb
1 Replies

8. UNIX for Dummies Questions & Answers

Problem setting up SSH keys between my laptop and a server.

This is probably somewhat trivial but it's driving me crazy. I have 6 servers with identical configurations. I'm trying to set up ssh keys between my laptop (windows XP using cygwin) and these servers (rhel). On 5 of the machines this works perfectly, but on one, no matter what I do, it gives me a... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

9. UNIX for Advanced & Expert Users

VxWorks target server

hi all. i have omniswitch 6800 that runs vxworks 5.4.x The folder that is result of compiling my image consists of : -rw-r--r-- 1 root other 8128249 Jun 21 05:21 Kbase.img -rw-r--r-- 1 root other 971810 Jun 21 06:07 Kos.img -rw-r--r-- 1 root other 295076 Jun 21... (0 Replies)
Discussion started by: sadgb
0 Replies
RADIUSD(8)							 FreeRADIUS Daemon							RADIUSD(8)

NAME
radiusd - Authentication, Authorization and Accounting server SYNOPSIS
radiusd [-C] [-d config_directory] [-f] [-h] [-i ip-address] [-l log_file] [-m] [-n name] [-p port] [-s] [-t] [-v] [-x] [-X] DESCRIPTION
FreeRADIUS is a high-performance and highly configurable RADIUS server. It supports many database back-ends such as flat-text files, SQL, LDAP, Perl, Python, etc. It also supports many authentication protocols such as PAP, CHAP, MS-CHAP(v2), HTTP Digest, and EAP (EAP-MD5, EAP-TLS, PEAP, EAP-TTLS, EAP-SIM, etc.). It also has fullsupport for Cisco's VLAN Query Protocol (VMPS) and DHCP. Please read the DEBUGGING section below. It contains instructions for quickly configuring the server for your local system. OPTIONS
The following command-line options are accepted by the server: -C Check the configuration and exit immediately. If there is a problem reading the configuration, then the server will exit with a non-zero status code. If the configuration appears to be acceptable, then the server will exit with a zero status code. Note that there are limitations to this check. Due to the complexities involved in almost starting a RADIUS server, these checks are necessarily incomplete. The server can return a zero status code when run with -C, but may still exit with an error when run normally. See the output of radiusd -XC for an informative list of which modules are checked for correct configuration, and which modules are skipped, and therefore not checked. -d config directory Defaults to /etc/raddb. Radiusd looks here for its configuration files such as the dictionary and the users files. -f Do not fork, stay running as a foreground process. -h Print usage help information. -i ip-address Defines which IP address that the server uses for sending and receiving packets. If this command-line option is given, then the "bind_address" and all "listen{}" entries in radiusd.conf are ignored. This option MUST be used in conjunction with "-p". -l log_file Defaults to ${logdir}/radius.log. Radiusd writes it's logging information to this file. If log_file is the string "stdout" logging will be written to stdout. -m On SIGINT or SIGQUIT exit cleanly instead of immediately. This is most useful for when running the server with "valgrind". -n name Read raddb/name.conf instead of raddb/radiusd.conf. -p port Defines which port is used for receiving authentication packets. Accounting packets are received on "port + 1". When this command-line option is given, all "listen" sections in radiusd.conf are ignored. This option MUST be used in conjunction with "-i". -s Run in "single server" mode. The server normally runs with multiple threads and/or processes, which can lower its response time to requests. Some systems have issues with threading, however, so running in "single server" mode may help to address those issues. In single server mode, the server will also not "daemonize" (auto-background) itself. -t Do not spawn threads. -v Print server version information and exit. -X Debugging mode. Equivalent to "-sfxx -l stdout". When trying to understand how the server works, ALWAYS run it with "radiusd -X". For production servers, use "raddebug" -x Finer-grained debug mode. In this mode the server will print details of every request on it's stdout output. You can specify this option multiple times (-x -x or -xx) to get more detailed output. DEBUGGING
The default configuration is set to work in the widest possible circumstances. It requires minimal changes for your system. However, your needs may be complex, and may require significant changes to the server configuration. Making random changes is a guaranteed method of failure. Instead, we STRONGLY RECOMMEND proceeding via the following steps: 1) Always run the server in debugging mode ( radiusd -X ) after making a configuration change. We cannot emphasize this enough. If you are not running the server in debugging mode, you will not be able to see what is doing, and you will not be able to correct any problems. If you ask questions on the mailing list, the first response will be to tell you "run the server in debugging mode". Please, follow these instructions. 2) Change as little as possible in the default configuration files. The server contains a decade of experience with protocols, databases, and different systems. Its default configuration is designed to work almost everywhere, and to do almost everything you need. 3) When you make a small change, testing it before changing anything else. If the change works, save a copy of the configuration, and make another change. If the change doesn't work, debug it, and try to understand why it doesn't work. If you begin by making large changes to the server configuration, it will never work, and you will never be able to debug the problem. 4) If you need to add a connection to a database FOO (e.g. LDAP or SQL), then: a) Edit raddb/modules/foo This file contains the default configuration for the module. It contains comments describing what can be configured, and what those configuration entries mean. b) Edit raddb/sites-available/default This file contains the default policy for the server. e.g. "enable CHAP, MS-CHAP, and EAP authentication". Look in this file for all references to your module "foo". Read the comments, and remove the leading hash '#' from the lines referencing the module. This enables the module. c) Edit raddb/sites-available/inner-tunnel This file contains the default policy for the "tunneled" portion of certain EAP methods. Perform the same kind of edits as above, for the "default" file.. If you are not using EAP (802.1X), then this step can be skipped. d) Start the server in debugging mode ( radiusd -X ), and start testing. 5) Ask questions on the mailing list (freeradius-users@lists.freeradius.org). When asking questions, include the output from debugging mode ( radiusd -X ). This information will allow people to help you. If you do not include it, the first response to your message will be "post the output of debug mode". Ask questions earlier, rather than later. If you cannot solve a problem in a day, ask a question on the mailing list. Most questions have been seen before, and can be answered quickly. BACKGROUND
RADIUS is a protocol spoken between an access server, typically a device connected to several modems or ISDN lines, and a radius server. When a user connects to the access server, (s)he is asked for a loginname and a password. This information is then sent to the radius server. The server replies with "access denied", or "access OK". In the latter case login information is sent along, such as the IP address in the case of a PPP connection. The access server also sends login and logout records to the radius server so accounting can be done. These records are kept for each ter- minal server seperately in a file called detail, and in the wtmp compatible logfile /var/log/radwtmp. CONFIGURATION
Radiusd uses a number of configuration files. Each file has it's own manpage describing the format of the file. These files are: radiusd.conf The main configuration file, which sets the administrator-controlled items. dictionary This file is usually static. It defines all the possible RADIUS attributes used in the other configuration files. You don't have to modify it. It includes other dictionary files in the same directory. hints Defines certain hints to the radius server based on the users's loginname or other attributes sent by the access server. It also provides for mapping user names (such as Pusername -> username). This provides the functionality that the Livingston 2.0 server has as "Prefix" and "Suffix" support in the users file, but is more general. Ofcourse the Livingston way of doing things is also sup- ported, and you can even use both at the same time (within certain limits). huntgroups Defines the huntgroups that you have, and makes it possible to restrict access to certain huntgroups to certain (groups of) users. users Here the users are defined. On a typical setup, this file mainly contains DEFAULT entries to process the different types of logins, based on hints from the hints file. Authentication is then based on the contents of the UNIX /etc/passwd file. However it is also possible to define all users, and their passwords, in this file. SEE ALSO
rradiusd.conf(5), users(5), huntgroups(5), hints(5), dictionary(5), raddebug(8) AUTHOR
The FreeRADIUS Server Project (http://www.freeradius.org) 26 Apr 2012 RADIUSD(8)
All times are GMT -4. The time now is 10:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy