Use a script for a telnet sessionTelnet BASH script - output not savedcrontab -e not workingExpect script +...
Can I tell a prospective employee that everyone in the team is leaving?
Why were helmets and other body armour not commonplace in the 1800s?
Is real public IP Address hidden when using a system wide proxy in Windows 10?
How to respond to an upset student?
number headings
How to know if a folder is a symbolic link?
A Riley Respite
Is it possible to remotely hack the GPS system and disable GPS service worldwide?
Are these reasonable traits for someone with autism?
Why aren't space telescopes put in GEO?
The art of clickbait captions
How to use libraries with delays inside within a time critical STM32 HAL application?
what kind of chord progession is this?
Why would Ryanair allow me to book this journey through a third party, but not through their own website?
Why didn't Thanos use the Time Stone to stop the Avengers' plan?
Caught 2 students cheating together on the final exam that I proctored
Pirate democracy at its finest
Is it true that cut time means "play twice as fast as written"?
Construct a word ladder
What is Theresa May waiting for?
Do photons bend spacetime or not?
Where have Brexit voters gone?
How long until a random word with letters "A", "B", "C" ends in the pattern "ABC"?
Inconsistent results from Wolfram Could
Use a script for a telnet session
Telnet BASH script - output not savedcrontab -e not workingExpect script + automated telnet process between three Linux machinesShell script to perform telnet session to ser2netTelnet session closed by foreign hostTelnet BASH script - Some commands are running out of telnet sessionTelnet for port 80 not workingExpect script seems to ignore prompt (RSA fingerprint confirmation)Verbose mode for telnetExpect script to ssh into a remote host and change its passwordTelnet connection Procurve switchUpstart script with expect scripting
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I have a problem with my script. It seems my password is wrong.
#!/usr/bin/expect
set ip [lindex $argv 0]
spawn telnet $ip
set timeout 10
expect "Login:"
send "administratorr"
expect "Password:"
send "123456"
send "r"
It says, login incorrect
. But it works, when i use cmd
on Windows to telnet to my phone, it works with "administrator" and 123456 as password.
I don't know why in my script, I could not log on successfully.
I have to use this script to downgrade/upgrade my phones.
shell expect telnet telephony
bumped to the homepage by Community♦ 44 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 4 more comments
I have a problem with my script. It seems my password is wrong.
#!/usr/bin/expect
set ip [lindex $argv 0]
spawn telnet $ip
set timeout 10
expect "Login:"
send "administratorr"
expect "Password:"
send "123456"
send "r"
It says, login incorrect
. But it works, when i use cmd
on Windows to telnet to my phone, it works with "administrator" and 123456 as password.
I don't know why in my script, I could not log on successfully.
I have to use this script to downgrade/upgrade my phones.
shell expect telnet telephony
bumped to the homepage by Community♦ 44 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Your directive /usr/bin/expecct has an extra c in it. That might not be causing the issue, but could you correct it and try?
– rahul
Feb 13 '15 at 11:15
Also, take a look at this link - bash.cyberciti.biz/security/expect-ssh-login-script. The password could be in uppercase or lower case. Try this and see if it helps.
– rahul
Feb 13 '15 at 11:16
My password is only numbers :/ And sorry for the expecct, my bad, in my script it's expect.
– Xiuur
Feb 13 '15 at 11:20
You haven't send r after your password, plus you have a send with /r instead r
– YoMismo
Feb 13 '15 at 11:21
What i meant was the prompt could be either "Password:" or "password", can you try replacing the expect "Password:" with expect "?assword:"
– rahul
Feb 13 '15 at 11:22
|
show 4 more comments
I have a problem with my script. It seems my password is wrong.
#!/usr/bin/expect
set ip [lindex $argv 0]
spawn telnet $ip
set timeout 10
expect "Login:"
send "administratorr"
expect "Password:"
send "123456"
send "r"
It says, login incorrect
. But it works, when i use cmd
on Windows to telnet to my phone, it works with "administrator" and 123456 as password.
I don't know why in my script, I could not log on successfully.
I have to use this script to downgrade/upgrade my phones.
shell expect telnet telephony
I have a problem with my script. It seems my password is wrong.
#!/usr/bin/expect
set ip [lindex $argv 0]
spawn telnet $ip
set timeout 10
expect "Login:"
send "administratorr"
expect "Password:"
send "123456"
send "r"
It says, login incorrect
. But it works, when i use cmd
on Windows to telnet to my phone, it works with "administrator" and 123456 as password.
I don't know why in my script, I could not log on successfully.
I have to use this script to downgrade/upgrade my phones.
shell expect telnet telephony
shell expect telnet telephony
edited Feb 13 '15 at 11:39
Minix
2,33152040
2,33152040
asked Feb 13 '15 at 11:08
XiuurXiuur
13
13
bumped to the homepage by Community♦ 44 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 44 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Your directive /usr/bin/expecct has an extra c in it. That might not be causing the issue, but could you correct it and try?
– rahul
Feb 13 '15 at 11:15
Also, take a look at this link - bash.cyberciti.biz/security/expect-ssh-login-script. The password could be in uppercase or lower case. Try this and see if it helps.
– rahul
Feb 13 '15 at 11:16
My password is only numbers :/ And sorry for the expecct, my bad, in my script it's expect.
– Xiuur
Feb 13 '15 at 11:20
You haven't send r after your password, plus you have a send with /r instead r
– YoMismo
Feb 13 '15 at 11:21
What i meant was the prompt could be either "Password:" or "password", can you try replacing the expect "Password:" with expect "?assword:"
– rahul
Feb 13 '15 at 11:22
|
show 4 more comments
Your directive /usr/bin/expecct has an extra c in it. That might not be causing the issue, but could you correct it and try?
– rahul
Feb 13 '15 at 11:15
Also, take a look at this link - bash.cyberciti.biz/security/expect-ssh-login-script. The password could be in uppercase or lower case. Try this and see if it helps.
– rahul
Feb 13 '15 at 11:16
My password is only numbers :/ And sorry for the expecct, my bad, in my script it's expect.
– Xiuur
Feb 13 '15 at 11:20
You haven't send r after your password, plus you have a send with /r instead r
– YoMismo
Feb 13 '15 at 11:21
What i meant was the prompt could be either "Password:" or "password", can you try replacing the expect "Password:" with expect "?assword:"
– rahul
Feb 13 '15 at 11:22
Your directive /usr/bin/expecct has an extra c in it. That might not be causing the issue, but could you correct it and try?
– rahul
Feb 13 '15 at 11:15
Your directive /usr/bin/expecct has an extra c in it. That might not be causing the issue, but could you correct it and try?
– rahul
Feb 13 '15 at 11:15
Also, take a look at this link - bash.cyberciti.biz/security/expect-ssh-login-script. The password could be in uppercase or lower case. Try this and see if it helps.
– rahul
Feb 13 '15 at 11:16
Also, take a look at this link - bash.cyberciti.biz/security/expect-ssh-login-script. The password could be in uppercase or lower case. Try this and see if it helps.
– rahul
Feb 13 '15 at 11:16
My password is only numbers :/ And sorry for the expecct, my bad, in my script it's expect.
– Xiuur
Feb 13 '15 at 11:20
My password is only numbers :/ And sorry for the expecct, my bad, in my script it's expect.
– Xiuur
Feb 13 '15 at 11:20
You haven't send r after your password, plus you have a send with /r instead r
– YoMismo
Feb 13 '15 at 11:21
You haven't send r after your password, plus you have a send with /r instead r
– YoMismo
Feb 13 '15 at 11:21
What i meant was the prompt could be either "Password:" or "password", can you try replacing the expect "Password:" with expect "?assword:"
– rahul
Feb 13 '15 at 11:22
What i meant was the prompt could be either "Password:" or "password", can you try replacing the expect "Password:" with expect "?assword:"
– rahul
Feb 13 '15 at 11:22
|
show 4 more comments
1 Answer
1
active
oldest
votes
I found the answer. I just have to put some
sleep
command before
expect "Login:"
Thanks to all.
It is possible to select one's own answer as "accepted". Do that.
– Kusalananda♦
Jan 1 '17 at 14:34
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f184666%2fuse-a-script-for-a-telnet-session%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I found the answer. I just have to put some
sleep
command before
expect "Login:"
Thanks to all.
It is possible to select one's own answer as "accepted". Do that.
– Kusalananda♦
Jan 1 '17 at 14:34
add a comment |
I found the answer. I just have to put some
sleep
command before
expect "Login:"
Thanks to all.
It is possible to select one's own answer as "accepted". Do that.
– Kusalananda♦
Jan 1 '17 at 14:34
add a comment |
I found the answer. I just have to put some
sleep
command before
expect "Login:"
Thanks to all.
I found the answer. I just have to put some
sleep
command before
expect "Login:"
Thanks to all.
edited Sep 28 '16 at 0:38
Tomasz
10.4k73371
10.4k73371
answered Feb 13 '15 at 12:28
XiuurXiuur
13
13
It is possible to select one's own answer as "accepted". Do that.
– Kusalananda♦
Jan 1 '17 at 14:34
add a comment |
It is possible to select one's own answer as "accepted". Do that.
– Kusalananda♦
Jan 1 '17 at 14:34
It is possible to select one's own answer as "accepted". Do that.
– Kusalananda♦
Jan 1 '17 at 14:34
It is possible to select one's own answer as "accepted". Do that.
– Kusalananda♦
Jan 1 '17 at 14:34
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f184666%2fuse-a-script-for-a-telnet-session%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
Your directive /usr/bin/expecct has an extra c in it. That might not be causing the issue, but could you correct it and try?
– rahul
Feb 13 '15 at 11:15
Also, take a look at this link - bash.cyberciti.biz/security/expect-ssh-login-script. The password could be in uppercase or lower case. Try this and see if it helps.
– rahul
Feb 13 '15 at 11:16
My password is only numbers :/ And sorry for the expecct, my bad, in my script it's expect.
– Xiuur
Feb 13 '15 at 11:20
You haven't send r after your password, plus you have a send with /r instead r
– YoMismo
Feb 13 '15 at 11:21
What i meant was the prompt could be either "Password:" or "password", can you try replacing the expect "Password:" with expect "?assword:"
– rahul
Feb 13 '15 at 11:22