SSH Multiple Session -> “stdin: is not a tty”
I have a Linux-VPS, using it as GIT- and HTTP-Server.
HTTP: Apache
Git-server: git-http-backend via vhost
When i log me in via SSH, everything is fine.
But if i open a second SSH-Connection , i get this error:
stdin: is not a tty
I use ssh for years and have never seen such an error.. I searched around for over 1.5 hours..
** While i wrote this, the error gots even more strange - now the error comes on every connection!
I havent found any solution that helped me..
Im using..
- Windows
- Secure Shell Client (quite outdatet, but much nicer than putty)
linux ssh apache-http-server git
|
show 2 more comments
I have a Linux-VPS, using it as GIT- and HTTP-Server.
HTTP: Apache
Git-server: git-http-backend via vhost
When i log me in via SSH, everything is fine.
But if i open a second SSH-Connection , i get this error:
stdin: is not a tty
I use ssh for years and have never seen such an error.. I searched around for over 1.5 hours..
** While i wrote this, the error gots even more strange - now the error comes on every connection!
I havent found any solution that helped me..
Im using..
- Windows
- Secure Shell Client (quite outdatet, but much nicer than putty)
linux ssh apache-http-server git
Tryssh -t
or evenssh -tt
.
– garethTheRed
Nov 11 '14 at 15:51
I added new Information. If i try in putty (plink), not even -t , -t -t or sth works, already tried it.
– Mijago
Nov 11 '14 at 16:02
I don't thinkplink
has a-t
option to force a pseudo-tty, which explains why it didn't work. If things are getting worse, have you considered a reboot?
– garethTheRed
Nov 11 '14 at 16:10
Yes, many times.. Yesterday i had the same issue and after a few reboots and tries I reinstalled the VM, but as we see it doesnt help
– Mijago
Nov 11 '14 at 16:13
Tryputty
instead. Apparently, there is a SSH tree on the left where you can control pseudo-tty allocation. I don't use it myself, so can't confirm/deny :-)
– garethTheRed
Nov 11 '14 at 16:21
|
show 2 more comments
I have a Linux-VPS, using it as GIT- and HTTP-Server.
HTTP: Apache
Git-server: git-http-backend via vhost
When i log me in via SSH, everything is fine.
But if i open a second SSH-Connection , i get this error:
stdin: is not a tty
I use ssh for years and have never seen such an error.. I searched around for over 1.5 hours..
** While i wrote this, the error gots even more strange - now the error comes on every connection!
I havent found any solution that helped me..
Im using..
- Windows
- Secure Shell Client (quite outdatet, but much nicer than putty)
linux ssh apache-http-server git
I have a Linux-VPS, using it as GIT- and HTTP-Server.
HTTP: Apache
Git-server: git-http-backend via vhost
When i log me in via SSH, everything is fine.
But if i open a second SSH-Connection , i get this error:
stdin: is not a tty
I use ssh for years and have never seen such an error.. I searched around for over 1.5 hours..
** While i wrote this, the error gots even more strange - now the error comes on every connection!
I havent found any solution that helped me..
Im using..
- Windows
- Secure Shell Client (quite outdatet, but much nicer than putty)
linux ssh apache-http-server git
linux ssh apache-http-server git
edited Nov 11 '14 at 16:01
Mijago
asked Nov 11 '14 at 15:43
MijagoMijago
10614
10614
Tryssh -t
or evenssh -tt
.
– garethTheRed
Nov 11 '14 at 15:51
I added new Information. If i try in putty (plink), not even -t , -t -t or sth works, already tried it.
– Mijago
Nov 11 '14 at 16:02
I don't thinkplink
has a-t
option to force a pseudo-tty, which explains why it didn't work. If things are getting worse, have you considered a reboot?
– garethTheRed
Nov 11 '14 at 16:10
Yes, many times.. Yesterday i had the same issue and after a few reboots and tries I reinstalled the VM, but as we see it doesnt help
– Mijago
Nov 11 '14 at 16:13
Tryputty
instead. Apparently, there is a SSH tree on the left where you can control pseudo-tty allocation. I don't use it myself, so can't confirm/deny :-)
– garethTheRed
Nov 11 '14 at 16:21
|
show 2 more comments
Tryssh -t
or evenssh -tt
.
– garethTheRed
Nov 11 '14 at 15:51
I added new Information. If i try in putty (plink), not even -t , -t -t or sth works, already tried it.
– Mijago
Nov 11 '14 at 16:02
I don't thinkplink
has a-t
option to force a pseudo-tty, which explains why it didn't work. If things are getting worse, have you considered a reboot?
– garethTheRed
Nov 11 '14 at 16:10
Yes, many times.. Yesterday i had the same issue and after a few reboots and tries I reinstalled the VM, but as we see it doesnt help
– Mijago
Nov 11 '14 at 16:13
Tryputty
instead. Apparently, there is a SSH tree on the left where you can control pseudo-tty allocation. I don't use it myself, so can't confirm/deny :-)
– garethTheRed
Nov 11 '14 at 16:21
Try
ssh -t
or even ssh -tt
.– garethTheRed
Nov 11 '14 at 15:51
Try
ssh -t
or even ssh -tt
.– garethTheRed
Nov 11 '14 at 15:51
I added new Information. If i try in putty (plink), not even -t , -t -t or sth works, already tried it.
– Mijago
Nov 11 '14 at 16:02
I added new Information. If i try in putty (plink), not even -t , -t -t or sth works, already tried it.
– Mijago
Nov 11 '14 at 16:02
I don't think
plink
has a -t
option to force a pseudo-tty, which explains why it didn't work. If things are getting worse, have you considered a reboot?– garethTheRed
Nov 11 '14 at 16:10
I don't think
plink
has a -t
option to force a pseudo-tty, which explains why it didn't work. If things are getting worse, have you considered a reboot?– garethTheRed
Nov 11 '14 at 16:10
Yes, many times.. Yesterday i had the same issue and after a few reboots and tries I reinstalled the VM, but as we see it doesnt help
– Mijago
Nov 11 '14 at 16:13
Yes, many times.. Yesterday i had the same issue and after a few reboots and tries I reinstalled the VM, but as we see it doesnt help
– Mijago
Nov 11 '14 at 16:13
Try
putty
instead. Apparently, there is a SSH tree on the left where you can control pseudo-tty allocation. I don't use it myself, so can't confirm/deny :-)– garethTheRed
Nov 11 '14 at 16:21
Try
putty
instead. Apparently, there is a SSH tree on the left where you can control pseudo-tty allocation. I don't use it myself, so can't confirm/deny :-)– garethTheRed
Nov 11 '14 at 16:21
|
show 2 more comments
2 Answers
2
active
oldest
votes
Are you "chaining" ssh connections? That may be the cause. I think https://unix.stackexchange.com/questions/48527/ssh-inside-ssh-fails-with-stdin-is-not-a-tty is relevant.
No, Im not chaining ssh-connections. I got to this page during my searching but thats nothing that can help me
– Mijago
Nov 11 '14 at 16:03
add a comment |
For reasons I do not understand (but see later), your shell is not set to interactive; just issue, on the remote server,
bash -i
this will make the shell interactive and you will be good to go. At this point you may have to source your .bashrc file, because the standard ones are often provided with the following lines, located just at the top of the file:
case $- in
*i*) ;;
*) return;;
esac
This checks whether among the shell flags ($-) there is an i, for interactive; if it is not present, it skips sourcing the file. hence the need to now run
source ~/.bashrc
which will give you your standard environment. I strongly discourage you from executing bash -i automatically, for instance inside your .bashrc file: executing an automatic script that sets the shell to interactive is an oxymoron, and is equivalent to pointing a loaded gun to your temple.
As to why this error message arises, I can only speculate:
your ISP allows a small number of simultaneous PTYs to be allocated to each user; it is for instance GitHub's policy (it allows zero PTYs), but cannot really see the advantage in allowing a small, but non-zero number. But then, there may be someone smarter than I who can cast a light on this...
you are trying to ssh from within a reverse shell, a well-known problem to pentesters. There are ways around it.
it is something related to either the oldish version of Secure Shell Client you are using, or to Windows, but in either case I can be of little help.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f838680%2fssh-multiple-session-stdin-is-not-a-tty%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Are you "chaining" ssh connections? That may be the cause. I think https://unix.stackexchange.com/questions/48527/ssh-inside-ssh-fails-with-stdin-is-not-a-tty is relevant.
No, Im not chaining ssh-connections. I got to this page during my searching but thats nothing that can help me
– Mijago
Nov 11 '14 at 16:03
add a comment |
Are you "chaining" ssh connections? That may be the cause. I think https://unix.stackexchange.com/questions/48527/ssh-inside-ssh-fails-with-stdin-is-not-a-tty is relevant.
No, Im not chaining ssh-connections. I got to this page during my searching but thats nothing that can help me
– Mijago
Nov 11 '14 at 16:03
add a comment |
Are you "chaining" ssh connections? That may be the cause. I think https://unix.stackexchange.com/questions/48527/ssh-inside-ssh-fails-with-stdin-is-not-a-tty is relevant.
Are you "chaining" ssh connections? That may be the cause. I think https://unix.stackexchange.com/questions/48527/ssh-inside-ssh-fails-with-stdin-is-not-a-tty is relevant.
edited Apr 13 '17 at 12:37
Community♦
1
1
answered Nov 11 '14 at 15:51
PriceChildPriceChild
4,08412029
4,08412029
No, Im not chaining ssh-connections. I got to this page during my searching but thats nothing that can help me
– Mijago
Nov 11 '14 at 16:03
add a comment |
No, Im not chaining ssh-connections. I got to this page during my searching but thats nothing that can help me
– Mijago
Nov 11 '14 at 16:03
No, Im not chaining ssh-connections. I got to this page during my searching but thats nothing that can help me
– Mijago
Nov 11 '14 at 16:03
No, Im not chaining ssh-connections. I got to this page during my searching but thats nothing that can help me
– Mijago
Nov 11 '14 at 16:03
add a comment |
For reasons I do not understand (but see later), your shell is not set to interactive; just issue, on the remote server,
bash -i
this will make the shell interactive and you will be good to go. At this point you may have to source your .bashrc file, because the standard ones are often provided with the following lines, located just at the top of the file:
case $- in
*i*) ;;
*) return;;
esac
This checks whether among the shell flags ($-) there is an i, for interactive; if it is not present, it skips sourcing the file. hence the need to now run
source ~/.bashrc
which will give you your standard environment. I strongly discourage you from executing bash -i automatically, for instance inside your .bashrc file: executing an automatic script that sets the shell to interactive is an oxymoron, and is equivalent to pointing a loaded gun to your temple.
As to why this error message arises, I can only speculate:
your ISP allows a small number of simultaneous PTYs to be allocated to each user; it is for instance GitHub's policy (it allows zero PTYs), but cannot really see the advantage in allowing a small, but non-zero number. But then, there may be someone smarter than I who can cast a light on this...
you are trying to ssh from within a reverse shell, a well-known problem to pentesters. There are ways around it.
it is something related to either the oldish version of Secure Shell Client you are using, or to Windows, but in either case I can be of little help.
add a comment |
For reasons I do not understand (but see later), your shell is not set to interactive; just issue, on the remote server,
bash -i
this will make the shell interactive and you will be good to go. At this point you may have to source your .bashrc file, because the standard ones are often provided with the following lines, located just at the top of the file:
case $- in
*i*) ;;
*) return;;
esac
This checks whether among the shell flags ($-) there is an i, for interactive; if it is not present, it skips sourcing the file. hence the need to now run
source ~/.bashrc
which will give you your standard environment. I strongly discourage you from executing bash -i automatically, for instance inside your .bashrc file: executing an automatic script that sets the shell to interactive is an oxymoron, and is equivalent to pointing a loaded gun to your temple.
As to why this error message arises, I can only speculate:
your ISP allows a small number of simultaneous PTYs to be allocated to each user; it is for instance GitHub's policy (it allows zero PTYs), but cannot really see the advantage in allowing a small, but non-zero number. But then, there may be someone smarter than I who can cast a light on this...
you are trying to ssh from within a reverse shell, a well-known problem to pentesters. There are ways around it.
it is something related to either the oldish version of Secure Shell Client you are using, or to Windows, but in either case I can be of little help.
add a comment |
For reasons I do not understand (but see later), your shell is not set to interactive; just issue, on the remote server,
bash -i
this will make the shell interactive and you will be good to go. At this point you may have to source your .bashrc file, because the standard ones are often provided with the following lines, located just at the top of the file:
case $- in
*i*) ;;
*) return;;
esac
This checks whether among the shell flags ($-) there is an i, for interactive; if it is not present, it skips sourcing the file. hence the need to now run
source ~/.bashrc
which will give you your standard environment. I strongly discourage you from executing bash -i automatically, for instance inside your .bashrc file: executing an automatic script that sets the shell to interactive is an oxymoron, and is equivalent to pointing a loaded gun to your temple.
As to why this error message arises, I can only speculate:
your ISP allows a small number of simultaneous PTYs to be allocated to each user; it is for instance GitHub's policy (it allows zero PTYs), but cannot really see the advantage in allowing a small, but non-zero number. But then, there may be someone smarter than I who can cast a light on this...
you are trying to ssh from within a reverse shell, a well-known problem to pentesters. There are ways around it.
it is something related to either the oldish version of Secure Shell Client you are using, or to Windows, but in either case I can be of little help.
For reasons I do not understand (but see later), your shell is not set to interactive; just issue, on the remote server,
bash -i
this will make the shell interactive and you will be good to go. At this point you may have to source your .bashrc file, because the standard ones are often provided with the following lines, located just at the top of the file:
case $- in
*i*) ;;
*) return;;
esac
This checks whether among the shell flags ($-) there is an i, for interactive; if it is not present, it skips sourcing the file. hence the need to now run
source ~/.bashrc
which will give you your standard environment. I strongly discourage you from executing bash -i automatically, for instance inside your .bashrc file: executing an automatic script that sets the shell to interactive is an oxymoron, and is equivalent to pointing a loaded gun to your temple.
As to why this error message arises, I can only speculate:
your ISP allows a small number of simultaneous PTYs to be allocated to each user; it is for instance GitHub's policy (it allows zero PTYs), but cannot really see the advantage in allowing a small, but non-zero number. But then, there may be someone smarter than I who can cast a light on this...
you are trying to ssh from within a reverse shell, a well-known problem to pentesters. There are ways around it.
it is something related to either the oldish version of Secure Shell Client you are using, or to Windows, but in either case I can be of little help.
answered Nov 11 '14 at 18:25
MariusMatutiaeMariusMatutiae
38.5k953100
38.5k953100
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f838680%2fssh-multiple-session-stdin-is-not-a-tty%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Try
ssh -t
or evenssh -tt
.– garethTheRed
Nov 11 '14 at 15:51
I added new Information. If i try in putty (plink), not even -t , -t -t or sth works, already tried it.
– Mijago
Nov 11 '14 at 16:02
I don't think
plink
has a-t
option to force a pseudo-tty, which explains why it didn't work. If things are getting worse, have you considered a reboot?– garethTheRed
Nov 11 '14 at 16:10
Yes, many times.. Yesterday i had the same issue and after a few reboots and tries I reinstalled the VM, but as we see it doesnt help
– Mijago
Nov 11 '14 at 16:13
Try
putty
instead. Apparently, there is a SSH tree on the left where you can control pseudo-tty allocation. I don't use it myself, so can't confirm/deny :-)– garethTheRed
Nov 11 '14 at 16:21