Opening a telnet connection as pseudotty - sockets

I am trying to create a number of connections to a cyclades server. This is done by using telnet to an IP address (IP_ADDR) and a port number (PORT). It works fine when I create one active connection but I need to run a script to map these connections to /dev/PSEUDO_TTY_PORT, which another program needs to access. I am running CentOS so the cyclades-server-client modules are not available and rtelnet isn't available either.
I believe the command should look something like this:
telnet IP_ADDR PORT /dev/PSEUDO_TTY_PORT
But that doesn't work, does anyone know how to properly map it?
Thank you.

Thanks #0andriy, managed to do so using
socat PTY, link=/dev/PSEUDO_TTY_PORT,raw,echo=0 TCP4:IP_ADDR:PORT

Related

Obtain ssh version externally using nmap

I would like to know if I can obtain ssh version using nmap of my external vps.
nmap -p 22 sV <domainname>
result:
22/tcp filtered ssh
Is there another nmap syntax so I can obtain ssh service version?
Just want to obtain the ssh service version of my external vps.
I tried alot of nmap commands but probably there's a struggle in-between like a firewall, which causes a filtered state. My own network is behind a DrayTek Device. Maybe a possible cause?
Thanks in advance!
The nmap option --badsum is able to provide insight about the existence of a firewall. A non firewall device that runs a full network stack will silently drop a bad checksum. In the case that your scan reaches an end device, you would expect to see the same result as your -sV scan. A firewall may offer a different reply to the --badsum.
The answer to your question regarding version, is that -sV is ideal, however -A may run some scripts that return useful information. You can also run --script=sshv1 or another specific script that is ssh related. More script options are here nmap scripts.

run a distribution test with jmeter in Vm Centos

I'm trying to run a distribution test for learning purpose and i'm using a Virtual machine Centos 7 as a slave in my Windows 7 ( master running in window 7) but even if i configure the master with the IP of the slave ( VM ), modifying the file jmeter.properties, doesn't work, i try run Jmeter-server in the Centos machine but this problem appears.
Created remote object: UnicastServerRef [liveRef: [endpoint:[127.0.0.1:44341](lo
cal),objID:[4e68a212:14a8564a618:-7fff, 5760053273490727502]]]
Server failed to start: java.rmi.RemoteException: Cannot start. localhost.locald
omain is a loopback address.
An error occurred: Cannot start. localhost.localdomain is a loopback address.
Can somebody give me a direction where look or a explanation how can i do it?
Thanks!
Put the following line in system.properties file: java.rmi.server.hostname=xxx.xxx.xxx.xxx
Alternatively start JMeter providing above property as a command-line argument as:
jmeter (or jmeter-server) -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx
Double check your network configuration, i.e. make sure that your /etc/hosts file contains the following lines:
127.0.0.1 localhost localhost.localdomain
xxx.xxx.xxx.xxx your CentOS machine hostname
In all above cases xxx.xxx.xxx.xxx should be IP address of your CentOS machine and this IP address must be different from 127.0.0.1.
Also make sure that you select "Bridged" networking in your Virtual Machine, machines should be able to reach each other over the network, firewalls should be properly configured to allow communication, etc.
For more information on different JMeter Properties and ways of setting/overriding them see Apache JMeter Properties Customization Guide

MySQL connection not working from within Perl CGI script

I can easily connect to a remote MySQL server using the DBI module in my Perl scripts. However, when I try to use the same connection settings/properties from within a CGI script, the connection fails.
There are no helpful errors/warnings being logged either in the apache error log, or the browser, in spite of using
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
Strangely, the exact same script works fine when executed from the terminal. I also tried connecting the CGI script to the MySQL server on localhost, but without any success.
On the other hand, phpMyAdmin works great on the machine.
I'm using CentOS Release 5.8. I'm suspecting it is a system/priveleges issue with the apache user or anywhere else on the OS, but have hit a dead end.
Any pointers would be much appreciated!
Thanks a lot.
Edit: I'm using the following connection string
$dbh = DBI->connect($ds, $uname, $pwd,{RaiseError => 1 }) or die "$DBI::errstr Could not connect: $!<br>";
Fixed it. In case anyone not too familiar with Linux administration faces similar issue, here's what had happened. The security system 'selinux' on my CentOS machine was prohibiting the httpd to establish network connection to the remote MySQL server. It had to be explicitly enabled with the following command
setsebool -P httpd_can_network_connect=1
One can read more about selinux over here:
http://wiki.centos.org/HowTos/SELinux
Check what users you have set up in MySQL. If you're trying to connect across a network connection, you could have a problem with the host association for the user.
Try:
select host,user from mysql.user

how to start jboss for my local network

First question is: it seems like magic that one I run ./run.sh, I can turn off the computer, turn it back on again and still it knows about //localhost:8080/jmx-console/. I looked in the start up programs and I don't see any hint of it. How does it remember?
Never mind, the real question is I want the host to be my local LAN and not just localhost. I found I could do shutdown.sh and that would indeed shutdown the server such that //localhost:8080/jmx-console/ would no longer work. That is good, now the next step is to confine it to my LAN. I know I can use ./run.sh -b 0.0.0.0 but that opens it to the world. My computer is at 192.168.1.100 so I tried ./run.sh -b 192.168.1.0 which I would take to mean take addresses in the range 192.168.1.XXX. The server "started" but I can't get it to answer any calls and I couldn't get shutdown.sh to do anything.
I started ./run.sh again and it hooked up to the localhost. I don't know if it still has a memory of my ./run.sh -b 192.168.1.0 or not. If so, I'd like to get rid of it. In any case I'd like to know what the correct command should be.
Thanks,
Ilan
Which version of jboss?
I use -b 127.0.0.1 on jboss 4

OpenOffice, listen socket (Windows XP)

How can I make OpenOffice 3.2.1 to listen a socket (Windows XP)?
I used
soffice "-accept=socket,host=localhost,port=12345;urp;"
or
soffice "-accept=socket,host=localhost,port=12345;urp;StarOffice.ServiceManager"
Have tryed different ports..
OOo starts, but netstat doesn't show any connection with such port number.
I thought it's because of some turned off win services on my machine
, so I tryed the same thing on another computer - no results
Searching google etc. it seems that I'm the only one with such a problem %) It looks strange..
You need to give netstat -a flag to see listening ports.