01-06-2011
Disallow new ssh connections for a while ?
Hello,
What is the best way to disallow new ssh connections for the duration of my session ?
I want to evade read/write collisions. Things work like that - one session put files on server, other copies these files and then deletes them. So in order to evade collision:
- I check if there are no established connections.
- Then I deny new connections temporarily.
- Do the job.
- Allow new connections again.
Maybe there are better ways to achieve the same result ?
thanks
Vilius
Last edited by vilius; 01-06-2011 at 08:13 AM..
8 More Discussions You Might Find Interesting
1. HP-UX
Hello All,
I have 2 qries about X connections on HP-UX :
1.How/where to determine whether "X connections" to the server are controlled.
2. How/where to determine whether "X11 connection" are tunnelled via ssh.
3. How/where to determine the "Time in minutes before unattended X terminals... (0 Replies)
Discussion started by: abhayh
0 Replies
2. BSD
just as the title says.
thanks.
#General Rule Sets
/sbin/ipfw add 0300 check-state
/sbin/ipfw add 0301 deny tcp from any to any in established
/sbin/ipfw add 0302 pass tcp from any to any out setup keep-state
/sbin/ipfw add 0303 pass udp from any to any out
#SSH FTP
/sbin/ipfw add 0400... (11 Replies)
Discussion started by: dwildgoose
11 Replies
3. AIX
I'm investigating an issue where rsync's to an AIX server will sometimes fail. I suspect the problem might be due to the number of simultaneous SSH connections being made to the host dropping the rsync attempts. I'd like to view the number of open ssh connections. The who command will list logged... (1 Reply)
Discussion started by: indiana_tas
1 Replies
4. Ubuntu
Hello friends,
I'm connection to an external network using a VPN configured over an Ubuntu.
The problem is that whenever I get connected to a remote computer using my VPN as router, after a while, sometimes short, sometimes long, sometimes immediately, the connection gets lost and I've to... (1 Reply)
Discussion started by: lzcool
1 Replies
5. AIX
Dear all expects,
I have a security problem that I would like to resolve.
I need to create a user ID in my AIX 5.3 environment and to point the login to a specific directory for FTP purposes. There is only 2 directories that I can allow the user ID to perform read/write. I would like to prevent... (2 Replies)
Discussion started by: kwliew999
2 Replies
6. UNIX for Dummies Questions & Answers
Hello All,
I want to test how much parallel ssh connections can be done on a server.
I am thinking of reading username and hostname from a file and then using a loop (may be for) to do ssh on different host.
Could anyone suggest me how can i write the script for the above.
Thank you in... (0 Replies)
Discussion started by: ABHIKORIA
0 Replies
7. Shell Programming and Scripting
hello ,
I need to check how many parallel ssh connections my server can take the load of.
I need to login to different host which i am planning to read from a file and then a write a loop which will do parallel ssh.
Please provide suggestion on how i can write script for the same.\
Thank... (1 Reply)
Discussion started by: ABHIKORIA
1 Replies
8. UNIX for Beginners Questions & Answers
Hello Forum,
I'm using a bit of code from a script I found that allows me to capture the status code of connecting via SSH to remote servers:
ssh -qno StrictHostKeyChecking=no -o ConnectTimeout=1 user@$InputIP 'ls -l /home/user >/dev/null 2>&1' > /dev/null 2>&1
status="$(echo $?)"
echo... (4 Replies)
Discussion started by: greavette
4 Replies
LEARN ABOUT NETBSD
listen
LISTEN(2) BSD System Calls Manual LISTEN(2)
NAME
listen -- listen for connections on a socket
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/socket.h>
int
listen(int s, int backlog);
DESCRIPTION
To accept connections, a socket is first created with socket(2), a willingness to accept incoming connections and a queue limit for incoming
connections are specified with listen(), and then the connections are accepted with accept(2). The listen() call applies only to sockets of
type SOCK_STREAM or SOCK_SEQPACKET.
The backlog parameter defines the maximum length the queue of pending connections may grow to. If a connection request arrives with the
queue full the client may receive an error with an indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, the
request may be ignored so that retries may succeed.
RETURN VALUES
A 0 return value indicates success; -1 indicates an error.
ERRORS
listen() will fail if:
[EBADF] The argument s is not a valid descriptor.
[ENOTSOCK] The argument s is not a socket.
[EOPNOTSUPP] The socket is not of a type that supports the operation listen().
SEE ALSO
accept(2), connect(2), socket(2)
HISTORY
The listen() function call appeared in 4.2BSD.
BUGS
The backlog is currently limited (silently) to 128.
BSD
December 11, 1993 BSD