Displaying 20 results from an estimated 24 matches for "tty_flag".
2000 Aug 24
0
Force pseudo-tty allocation option "-t"
...menu services.
This is similiar to what I am trying to do, use "-t" flag to ssh from my
application, however it just didn't seem to work.
>From the ssh.c source:
/* Do not allocate a tty if stdin is not a tty. */
if (!isatty(fileno(stdin))) {
if (tty_flag)
fprintf(stderr, "Pseudo-terminal will not be allocated because stdin is not a terminal.\n");
tty_flag = 0;
}
This seems like it doesn't allocate a pseudo-tty no matter what the command
line option set the tty_flag to, since it only che...
2005 Dec 16
1
Force TTY
Hi all,
I'm having problems with getting a tty against an extreme switch. I've tried
with the -t flag that is supposed to force a tty but it's not working.
I checked the code in ssh.c where this option is parsed:
case 't':
if (tty_flag)
force_tty_flag = 1;
tty_flag = 1;
break;
The tty_flag is initialized to 0 and what I can see this flag is always 0 at
this stage in the code. Thus it is impossible to set the force_tty_flag to
1.
Is this done intentionally or is it a bug? Why the if statement?
Best Regards,
Olle
____...
2000 Nov 29
1
Pseudo-tty allocation and -T option
Hello,
I've set up a cron job to use ssh with a remote forced command to delete the
contents of a directory. System A has the cron job and uses a specific key
for system B. No command as such is specified since the key on system B
specifies 'command=/bin/rm -rf ...'. However, I am getting error messages
back from the cron system (or rather from ssh) about it not allocating a tty
since
2020 May 20
0
[Bug 1997] Add QoS to ControlPath escapes
...un through the sequence and options
with the current versions:
* QoS is still decided after expansion (expansion happens in main; QoS
is set down from there in ssh_session2 / ssh_session2_open /
ssh_session2_setup)
* QoS, unless explicitly configured, is set to interactive based on the
presence of tty_flag || a successful X forwarding.
* tty_flag is set in main based on -t/-T, the presence of a command and
isatty a few lines before the control path expansion.
It should thus be relatively straight-forward to add a token for "is an
interactive session" that would lack the QoS solution's...
2004 Apr 01
0
[Bug 829] Don't allocate a tty if -n option is set
...-n <host>" is
able to open a session, but the session stays blocked because there is nothing
to be read on the input.
Following patch could be applied:
--- openssh-3.8p1.orig/ssh.c Wed Dec 17 06:33:11 2003
+++ openssh-3.8p1/ssh.c Thu Apr 1 09:01:02 2004
@@ -549,7 +549,7 @@
if (no_tty_flag)
tty_flag = 0;
/* Do not allocate a tty if stdin is not a tty. */
- if (!isatty(fileno(stdin)) && !force_tty_flag) {
+ if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) {
if (tty_flag)
logit("Pseudo-terminal will not be allocated because
stdin is...
2000 Aug 05
0
Protocol 2 and fork
...t fork to background if no command. */
- if (fork_after_authentication_flag && buffer_len(&command) == 0)
- fatal("Cannot fork into background without a command to execute.");
-
/* Allocate a tty by default if no command specified. */
if (buffer_len(&command) == 0)
tty_flag = 1;
@@ -511,6 +507,29 @@
/* reinit */
log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 0);
+ /* -N option only makes sense with protocol 2. It doesn't make sense
+ without port forwarding ??????
+ */
+ if ( options.num_local_forwards == 0 && options.num_remote_forwards...
2020 May 29
0
[Bug 1997] Add QoS to ControlPath escapes
...1/0 but something like I/NI for
Interactive/Non-Interactive or something like that. But that's just a
minor matter of preference. 1/0 works fine as well.
> If so, I'd be happy to write it.
That would be great!
> Would it make sense to make the condition `options.forward_x11 ||
> tty_flag` rather than plain `tty_flag` to capture the intention of
> the forwarding?
I think I agree that it's better not to do this. Especially the case of
a globally enabled ForwardX11 is worrying to me.
FWIW, I came up with a workaround to get my priorities straight ;-).
The case where I want to...
2009 Feb 18
1
ssh -f & pid
...se request the server to start a shell.
@@ -1223,6 +1259,12 @@
fatal("daemon() failed: %.200s", strerror(errno));
}
+ if (pid_file)
+ {
+ if (write_pid_file(pid_file) == -1)
+ fatal("write_pid(%s) failed: %.200s", pid_file, strerror(errno));
+ }
+
return client_loop(tty_flag, tty_flag ?
options.escape_char : SSH_ESCAPECHAR_NONE, id);
}
Folkert van Heusden
--
MultiTail is a versatile tool for watching logfiles and output of
commands. Filtering, coloring, merging, diff-view, etc.
http://www.vanheusden.com/multitail/
--------------------------------------------...
2016 Jan 14
0
Announce: Portable OpenSSH 7.1p2 released
...options->visual_host_key = 0;
if (options->ip_qos_interactive == -1)
--- ssh.c 30 Jul 2015 00:01:34 -0000 1.420
+++ ssh.c 13 Jan 2016 23:17:23 -0000
@@ -1882,9 +1882,6 @@ ssh_session2(void)
fork_postauth();
}
- if (options.use_roaming)
- request_roaming();
-
return client_loop(tty_flag, tty_flag ?
options.escape_char : SSH_ESCAPECHAR_NONE, id);
}
2012 Mar 29
1
percent_expand for QoS in ControlPath
...@@ main(int ac, char **av)
options.control_path = percent_expand(cp, "h", host,
"l", thishost, "n", host_arg, "r", options.user,
"p", portstr, "u", pw->pw_name, "L", shorthost,
+ "Q", iptos2str(tty_flag ?
+ options.ip_qos_interactive : options.ip_qos_bulk),
(char *)NULL);
xfree(cp);
}
Index: ssh_config.5
===================================================================
RCS file: /cvs/src/usr.bin/ssh/ssh_config.5,v
retrieving revision 1.154
diff -u -p -r1.154 ssh_config.5
--- s...
1999 Dec 10
2
[David Huggins-Daines <dhd@plcom.on.ca>] Bug#52414: ssh-add uses ssh-askpass, but ssh doesn't
...g indicating whether we should try to use ssh-askpass or not */
+int use_askpass = 0;
+
/* Prints a help message to the user. This function never returns. */
void
@@ -430,10 +433,20 @@
/* Do not allocate a tty if stdin is not a tty. */
if (!isatty(fileno(stdin))) {
+ FILE *dummy;
if (tty_flag)
fprintf(stderr, "Pseudo-terminal will not be allocated because stdin is not a terminal.\n");
tty_flag = 0;
+
+ /* Now to check if we should be using askpass */
+ if ((dummy = fopen("/dev/tty", "r"))) {
+ fclose(dummy);
+ } else {
+ if (getenv("DISPL...
2006 Jan 16
1
LocalCommand problem for tunneling on Linux
I've been testing tunneling on Linux with openssh-SNAP-20060116.tar.gz
and found a problem.
When I use LocalCommand for doing ifconfig stuff, the command line
was executed before a tunneling interface is opened. This causes
errors on Linux and the interface is not automatically set up.
This is not a problem on *BSD because you can do ifconfig for
unopened tun/tap interfaces. But in Linux,
2012 Jul 06
3
[Bug 1995] RequestTTY=no in config doesn't work if stdin is not a tty
...|
Attachment #2141|0 |1
is obsolete| |
--- Comment #1 from Damien Miller <djm at mindrot.org> ---
Created attachment 2171
--> https://bugzilla.mindrot.org/attachment.cgi?id=2171&action=edit
move initialisation of tty_flag to after config parsing
The original patch seems no longer to apply. Here's a regenerated one.
--
You are receiving this mail because:
You are watching the assignee of the bug.
2012 Aug 29
0
Announce: OpenSSH 6.1 released
...ept() in situations of file
descriptor exhaustion. Instead back off for a while.
* ssh(1)/sshd(8): Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs as
they were removed from the specification. bz#2023,
* sshd(8): Handle long comments in config files better. bz#2025
* ssh(1): Delay setting tty_flag so RequestTTY options are correctly
picked up. bz#1995
* sshd(8): Fix handling of /etc/nologin incorrectly being applied to root
on platforms that use login_cap.
Portable OpenSSH:
* sshd(8): Allow sshd pre-auth sandboxing to fall-back to the rlimit
sandbox from the Linux SECCOMP filter...
2012 Aug 29
0
Announce: OpenSSH 6.1 released
...ept() in situations of file
descriptor exhaustion. Instead back off for a while.
* ssh(1)/sshd(8): Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs as
they were removed from the specification. bz#2023,
* sshd(8): Handle long comments in config files better. bz#2025
* ssh(1): Delay setting tty_flag so RequestTTY options are correctly
picked up. bz#1995
* sshd(8): Fix handling of /etc/nologin incorrectly being applied to root
on platforms that use login_cap.
Portable OpenSSH:
* sshd(8): Allow sshd pre-auth sandboxing to fall-back to the rlimit
sandbox from the Linux SECCOMP filter...
2007 Aug 03
1
race condition with ControlMaster=auto
..._path);
/* FALLTHROUGH */
case SSHCTL_MASTER_NO:
break;
@@ -1452,6 +1462,8 @@
signal(SIGINT, control_client_sighandler);
signal(SIGTERM, control_client_sighandler);
signal(SIGWINCH, control_client_sigrelay);
+
+ debug("connected to control master; waiting for exit");
if (tty_flag)
enter_raw_mode();
2000 Aug 23
1
Protocol 2 remote forwarding patch
...t fork to background if no command. */
- if (fork_after_authentication_flag && buffer_len(&command) == 0)
- fatal("Cannot fork into background without a command to execute.");
-
/* Allocate a tty by default if no command specified. */
if (buffer_len(&command) == 0)
tty_flag = 1;
@@ -511,6 +507,29 @@
/* reinit */
log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 0);
+ /* -N option only makes sense with protocol 2. It doesn't make sense
+ without port forwarding ??????
+ */
+ if ( options.num_local_forwards == 0 && options.num_remote_forwards...
2012 Aug 21
5
Call for testing: OpenSSH 6.1
...ept() in situations of file
descriptor exhaustion. Instead back off for a while.
* ssh(1)/sshd(8): Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs as
they were removed from the specification. bz#2023,
* sshd(8): Handle long comments in config files better. bz#2025
* ssh(1): Delay setting tty_flag so RequestTTY options are correctly
picked up. bz#1995
* sshd(8): Fix handling of /etc/nologin incorrectly being applied to root
on platforms that use login_cap.
Portable OpenSSH:
* sshd(8): Allow sshd pre-auth sandboxing to fall-back to the rlimit
sandbox from the Linux SECCOMP filter...
2004 Jul 14
1
New dynamic window patch (with limits)
...c 2004-03-21 17:36:01.000000000 -0500
+++ openssh-3.8.1p1-dynwindow/ssh.c 2004-07-07 09:54:03.000000000 -0400
@@ -1117,7 +1117,11 @@
"session", SSH_CHANNEL_OPENING, in, out, err,
window, packetmax, CHAN_EXTENDED_WRITE,
"client-session", /*nonblock*/0);
-
+ if (!tty_flag) {
+ c->dynamic_window = 1;
+ set_unlimited(&c->input,1);
+ set_unlimited(&c->output,1);
+ }
debug3("ssh_session2_open: channel_new: %d", c->self);
channel_send_open(c->self);
Only in openssh-3.8.1p1-dynwindow: ssh_prng_cmds
2000 Aug 15
0
Experimental -R support patch for openssh client
...].port,
+ options.remote_forwards[i].host,
+ options.remote_forwards[i].host_port);
+ }
+}
+
extern void client_set_session_ident(int id);
void
@@ -963,7 +979,9 @@
/* should be pre-session */
init_local_fwd();
-
+ /* Jarno */
+ init_remote_fwd();
+
window = 32*1024;
if (tty_flag) {
packetmax = window/8;